Initial release #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: Build and Release aliastools | |
| on: | |
| push: | |
| tags: ["v*"] | |
| workflow_dispatch: | |
| jobs: | |
| # compile binaries on every push (or manual trigger) | |
| build: | |
| name: Build macOS Binaries | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Build | |
| run: chmod +x build && ./build | |
| env: | |
| APP_VERSION: ${{ github.ref_name }} | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: compiled-binaries # name used in next job | |
| path: | | |
| .build/apple/Products/Release/readalias | |
| .build/apple/Products/Release/mkalias | |
| # genererate a release for every tag | |
| release: | |
| name: Create GitHub Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 # Needed to grab README.md and LICENSE | |
| - name: Download Binaries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: compiled-binaries | |
| path: ./binaries | |
| - name: Zip for Release | |
| # -j will junk directories, creating a flat archive | |
| run: | | |
| zip -j aliastools-${{ github.ref_name }}-universal.zip \ | |
| ./binaries/readalias \ | |
| ./binaries/mkalias \ | |
| README.md \ | |
| LICENSE | |
| - name: Generate Checksum | |
| run: shasum -a 256 aliastools-${{ github.ref_name }}-universal.zip > aliastools-${{ github.ref_name }}-universal.zip.sha256 | |
| - name: Upload to GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| aliastools-${{ github.ref_name }}-universal.zip | |
| aliastools-${{ github.ref_name }}-universal.zip.sha256 | |
| generate_release_notes: true |