Add GitHub Releases workflow and fix README badges. #1
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*" | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: "Release tag to publish (e.g. v0.5.0-asm)" | |
| required: true | |
| default: "v0.5.0-asm" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install NASM | |
| run: sudo apt-get update && sudo apt-get install -y nasm zip | |
| - name: Build kura-asm | |
| run: bash asm/build.sh | |
| - name: Package Linux binary | |
| run: | | |
| mkdir -p dist/kura-asm-linux-x86_64 | |
| cp bin/kura-asm dist/kura-asm-linux-x86_64/ | |
| cp LICENSE README.md dist/kura-asm-linux-x86_64/ | |
| cd dist && zip -r ../kura-asm-linux-x86_64.zip kura-asm-linux-x86_64 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: kura-asm-linux | |
| path: kura-asm-linux-x86_64.zip | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build kura-asm | |
| shell: pwsh | |
| run: ./asm/build.ps1 | |
| - name: Package Windows binary | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force -Path dist/kura-asm-windows-x86_64 | Out-Null | |
| Copy-Item bin/kura-asm.exe dist/kura-asm-windows-x86_64/ | |
| Copy-Item LICENSE, README.md dist/kura-asm-windows-x86_64/ | |
| Compress-Archive -Path dist/kura-asm-windows-x86_64 -DestinationPath kura-asm-windows-x86_64.zip | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: kura-asm-windows | |
| path: kura-asm-windows-x86_64.zip | |
| release: | |
| needs: [build-linux, build-windows] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Resolve release tag | |
| id: meta | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "tag=${{ inputs.tag }}" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.meta.outputs.tag }} | |
| name: kura ${{ steps.meta.outputs.tag }} | |
| generate_release_notes: true | |
| files: | | |
| artifacts/kura-asm-linux/kura-asm-linux-x86_64.zip | |
| artifacts/kura-asm-windows/kura-asm-windows-x86_64.zip |