Release Version #6
This file contains hidden or 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 Version | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| type: string | |
| description: Version | |
| required: true | |
| draft: | |
| description: Create as draft | |
| type: boolean | |
| default: false | |
| jobs: | |
| Release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| env: | |
| VERSION: ${{ inputs.version }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get bundle version | |
| run: | | |
| version_str=${VERSION//./-} | |
| filename="ProIcons_v${version_str}.zip" | |
| echo "filename=$filename" >> $GITHUB_ENV | |
| - name: Create ZIP bundle | |
| working-directory: 'icons' | |
| run: zip -r $filename ./* | |
| - name: Generate changelog | |
| run: node ./bin/generateChangelog.js -w | |
| - name: Publish release to GitHub | |
| run: gh release create $VERSION "./icons/$filename" -F CHANGELOG.md -t "ProIcons v$VERSION" ${{ inputs.version == false && '-d' || '' }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} |