Skip to content

Commit

Permalink
fix: Fix semantic release version stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
shdwmtr committed Jul 16, 2024
1 parent 66490fb commit 7b436d7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,23 @@ jobs:
with:
submodules: true

- name: Setup | Node.js
uses: actions/setup-node@v3
with:
node-version: 20

- name: Setup | Semantic Release
run: npm install --save-dev semantic-release @semantic-release/github @semantic-release/exec
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# dry run to get the next version
- name: Write Version to File
id: write_version
run: |
VERSION=$(npx semantic-release --dry-run | grep "The next release version is" | sed -E 's/.*The next release version is ([0-9.]+).*/\1/')
echo -e "# current version of millennium\n$VERSION" > version.txt
- name: Read version from file
id: read_version
run: |
Expand Down Expand Up @@ -168,12 +185,7 @@ jobs:
cp D:/a/Millennium/Millennium/Python-3.11.8/PCbuild/win32/python311.dll D:/a/Millennium/Millennium/build/artifacts/python311.dll
cp /d/a/Millennium/Millennium/build/user32.dll D:/a/Millennium/Millennium/build/artifacts
- name: Setup | Node.js
uses: actions/setup-node@v3
with:
node-version: 20

- name: Setup | Run Semantic Release
run: npm install --save-dev semantic-release @semantic-release/github @semantic-release/exec && npx semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 7 additions & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
{
"path": "@semantic-release/github",
"assets": ["build/artifacts/python311.dll", "build/artifacts/user32.dll"]
}
},
[
"@semantic-release/exec",
{
"prepareCmd": "echo \"# current version of millennium\n${nextRelease.version}\" > version.txt; powershell.exe -File ./scripts/build.ps1"
}
]
]
}

0 comments on commit 7b436d7

Please sign in to comment.