Create release #236
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: Create release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build: | |
| uses: ./.github/workflows/ci.yaml | |
| publish: | |
| name: Publish GitHub Release Assets | |
| runs-on: ubuntu-latest | |
| needs: build | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| VERSION: ${{ github.ref_name }} | |
| MESSAGE: | | |
| WIP | |
| --- | |
| If hetzner-k3s is useful to you or your company, please consider [sponsoring its development](https://github.com/sponsors/vitobotta). | |
| Sponsorship helps ensure continued maintenance and new features. Thank you to our current sponsors! 🙏 | |
| steps: | |
| - name: Download Binaries Built by CI Workflow | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: hetzner-k3s-* | |
| merge-multiple: true | |
| - name: Verify All Binaries Present | |
| run: | | |
| set -euo pipefail | |
| expected_binaries=( | |
| "hetzner-k3s-macos-arm64" | |
| "hetzner-k3s-macos-amd64" | |
| "hetzner-k3s-linux-arm64" | |
| "hetzner-k3s-linux-amd64" | |
| ) | |
| for expected_binary in "${expected_binaries[@]}"; do | |
| if [[ ! -f "$expected_binary" ]]; then | |
| echo "Error, release requires $expected_binary to be generated by CI workflow" | |
| exit 2 | |
| fi | |
| done | |
| echo "All required hetzner-k3s binaries (${expected_binaries[@]}) were resolved, proceeding!" | |
| - name: Upload Binaries to GitHub Release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ env.GITHUB_TOKEN }} | |
| file: hetzner-k3s-* | |
| file_glob: true | |
| tag: ${{ env.VERSION }} | |
| overwrite: true | |
| body: ${{ env.MESSAGE }} |