-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (56 loc) · 1.91 KB
/
Copy pathversion.yml
File metadata and controls
69 lines (56 loc) · 1.91 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
name: Version
on:
workflow_dispatch:
permissions:
actions: write
contents: write
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 21.x
- name: Install NPM Packages
run: npm ci
working-directory: ./Streakathon.MAUI
- name: Bump Version
run: npm run version
working-directory: ./Streakathon.MAUI
- name: Sync Changesets Version
shell: pwsh
run: |
$package = Get-Content -Raw ./Streakathon.MAUI/package.json | ConvertFrom-Json
$version = $package.version
$xml = [Xml] (Get-Content ./Streakathon.MAUI/Streakathon.MAUI.csproj)
$xml.Project.PropertyGroup.ApplicationDisplayVersion = $version
$xml.Save("./Streakathon.MAUI/Streakathon.MAUI.csproj")
$appinstallerXml = [Xml] (Get-Content ./Streakathon.MAUI/Streakathon.appinstaller)
$appinstallerNewVersion = "{0}.0" -f $version
$appinstallerXml.AppInstaller.MainPackage.Version = $appinstallerNewVersion
$appinstallerXml.Save("./Streakathon.MAUI/Streakathon.appinstaller")
- name: Commit Version Bump
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git add ./Streakathon.MAUI/Streakathon.MAUI.csproj
git add ./Streakathon.MAUI/Streakathon.appinstaller
git add ./Streakathon.MAUI/CHANGELOG.md
git add ./Streakathon.MAUI/.changeset
git add ./Streakathon.MAUI/package.json
git commit -m "Bump version"
- name: Push Version Bump
run: |
git push origin master
- name: Master -> Release
run: |
git fetch origin release
git checkout -b release origin/release
git merge master
git push origin release