ci: update download links in release workflow and versioning workflow #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
branches: | |
- 'releases/*' | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: macos-14 | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- run: | | |
git config user.name "GitHub Actions" | |
git config user.email "[email protected]" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- run: | | |
npm install -g pnpm | |
pnpm install | |
- run: | | |
node docs/software_lists.mjs | |
git add README.md | |
git diff --cached --quiet || (git commit -m "docs: update software lists" && git push origin ${{ github.ref }}) | |
env: | |
CI: true | |
- uses: technote-space/toc-generator@v4 | |
with: | |
FOLDING: 'true' | |
- uses: TriPSs/conventional-changelog-action@v5 | |
id: changelog | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
release-count: 0 | |
skip-git-pull: 'true' | |
- run: | | |
export APP_VERSION=$(node -p "require('./package.json').version") | |
npm run production | |
- run: ls ./dist | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: ./dist | |
- uses: ncipollo/release-action@v1 | |
id: release | |
if: steps.changelog.outputs.skipped != 'true' | |
with: | |
allowUpdates: true | |
artifacts: 'dist/env-setup-*' | |
body: ${{ steps.changelog.outputs.clean_changelog }} | |
draft: false | |
generateReleaseNotes: true | |
name: ${{ steps.changelog.outputs.tag }} | |
prerelease: false | |
tag: ${{ steps.changelog.outputs.tag }} | |
token: ${{ secrets.PAT }} | |
- name: Merge release branch | |
if: steps.release.outputs.id != '' | |
run: | | |
git checkout main | |
git pull | |
git merge --no-ff ${{ steps.changelog.outputs.tag }} | |
git push |