Package #67
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: Package | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.version.outputs.version }} | |
| version_number: ${{ steps.version.outputs.version_number }} | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| id: ${{ steps.create_release.outputs.id }} | |
| steps: | |
| - name: Set version number | |
| run: | | |
| echo "version=${GITHUB_REF#*/*/}" >> $GITHUB_OUTPUT | |
| echo "version_number=${GITHUB_REF#*/*/v}" >> $GITHUB_OUTPUT | |
| id: version | |
| - uses: actions/checkout@v4 | |
| - name: Verify version | |
| run: interpreter/verify_version.sh ${{ steps.version.outputs.version }} | |
| default: | |
| strategy: | |
| matrix: | |
| os: | |
| - macos-latest | |
| - ubuntu-22.04 | |
| runs-on: ${{ matrix.os }} | |
| needs: release | |
| timeout-minutes: 3 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Package | |
| run: interpreter/create_package.sh ${{ needs.release.outputs.version }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: package-${{ matrix.os }} | |
| path: Out/release/kos-${{ needs.release.outputs.version_number }}* | |
| retention-days: 5 | |
| windows: | |
| runs-on: windows-2019 | |
| needs: release | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: msys2/setup-msys2@v2 | |
| with: | |
| path-type: inherit | |
| install: diffutils | |
| - uses: actions/checkout@v4 | |
| - name: Remove link.exe from MSYS2 | |
| shell: msys2 {0} | |
| run: rm -f /bin/link.exe | |
| - name: Add path to WiX Toolset | |
| run: echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| - name: Package | |
| shell: cmd | |
| run: | | |
| call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86 | |
| msys2 -c "interpreter/create_package.sh ${{ needs.release.outputs.version }}" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: package-windows | |
| path: Out/release/kos-${{ needs.release.outputs.version_number }}* | |
| retention-days: 5 | |
| upload: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - release | |
| - default | |
| - windows | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: "./artifacts" | |
| pattern: package-* | |
| merge-multiple: true | |
| - name: List downloaded artifacts | |
| run: ls -lR artifacts | |
| - name: Create and upload release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| draft: true | |
| prerelease: false | |
| name: ${{ needs.release.outputs.version }} | |
| tag_name: ${{ github.ref }} | |
| body: Release ${{ needs.release.outputs.version }} | |
| files: artifacts/kos-* |