feat: implement Linux-compatible versioning format #17
Workflow file for this run
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 | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| jobs: | |
| build: | |
| name: Build | |
| uses: ./.github/workflows/build.yml | |
| version: | |
| name: Prepare version string | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.version.outputs.version }} | |
| steps: | |
| - name: Output version string | |
| id: version | |
| env: | |
| TAG: ${{ github.ref_name }} | |
| run: echo "version=${TAG#v}" >> "$GITHUB_OUTPUT" | |
| package: | |
| needs: [build, version] | |
| name: Package | |
| uses: ./.github/workflows/package.yml | |
| with: | |
| version: ${{ needs.version.outputs.version }} | |
| release: | |
| needs: [package, version] | |
| name: Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Create release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAG: ${{ github.ref_name }} | |
| VERSION: ${{ needs.version.outputs.version }} | |
| run: | | |
| if gh release view "$TAG" > /dev/null 2>&1; then | |
| echo "Release $TAG already exists, skipping creation" | |
| else | |
| gh release create "$TAG" -t "$VERSION" --notes-from-tag | |
| fi | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: package.* | |
| path: packages | |
| merge-multiple: true | |
| - name: Upload assets | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAG: ${{ github.ref_name }} | |
| run: gh release upload "$TAG" packages/* |