-
Notifications
You must be signed in to change notification settings - Fork 754
73 lines (69 loc) · 2.22 KB
/
branch-snap.yml
File metadata and controls
73 lines (69 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Branch snap
on:
workflow_dispatch:
inputs:
releaseCandidate:
description: 'Is this a release candidate snap from main? (Will increment main version to be higher than next stable release)'
required: false
default: 'false'
type: boolean
permissions:
contents: write
pull-requests: write
jobs:
check-script:
uses: dotnet/arcade/.github/workflows/inter-branch-merge-base.yml@main
with:
configuration_file_path: '.config/snap-flow.json'
bump-main-version:
needs: check-script
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version: '24.x'
- name: Install dependencies
run: npm ci
- name: Update version.json
run: |
if [ "${{ github.event.inputs.releaseCandidate }}" = "true" ]; then
npx gulp incrementVersion --releaseCandidate=true
else
npx gulp incrementVersion
fi
- name: Create version update PR
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update main version
title: '[automated] Update main version'
branch: merge/update-main-version
update-release-version:
needs: check-script
if: github.ref == 'refs/heads/prerelease'
runs-on: ubuntu-latest
steps:
- name: Check out merge branch
uses: actions/checkout@v4
with:
ref: merge/prerelease-to-release
fetch-depth: 0
- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version: '24.x'
- name: Install dependencies
run: npm ci
- name: Update version.json for release
run: npx gulp updateVersionForStableRelease
- name: Commit and push version update
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Update version for stable release"
git push origin merge/prerelease-to-release