GitHub action to update an existing pre-release.
Based on https://github.com/viperproject/create-nightly-release
- name: Update release
id: update_release
uses: verus-lang/[email protected]
env:
# This token is provided by Actions, you do not need to create your own token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
id: <release id>
new_name: Release ${{ env.TAG_NAME }}
new_body: New body for the release
new_tag: ${{ env.TAG_NAME }}
delete_assets: true
- Checkout this repository and pull remote changes
git pull
- Checkout or create a release branch (replace
v1
with the major version number):
git checkout releases/v1; git pull origin main
orgit checkout -b releases/v1
- Run
npm version <newversion>
to set the version number - Run
rm -rf dist; rm -rf node_modules; npm ci
- Run
npm run package
- Force add the dist folder:
git add -f dist
- Commit:
git commit -m "<commit message>
- Push release branch:
git push
- Create a GitHub release with a tag, e.g.
v1.0.0
- Move the major tag (e.g.
v1
) to the latest release:
git tag -fa v1 -m "Update v1 tag"
git push origin v1 --force