Merge pull request #35 from lynnswap:codex/fix-refresh-queue-hardening #4
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: | |
| test: | |
| name: Test | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Setup Swift 6.2 | |
| uses: swift-actions/setup-swift@7ca6abe6b3b0e8b5421b88be48feee39cbf52c6a # v2 | |
| with: | |
| swift-version: "6.2" | |
| - name: Run tests | |
| run: swift test -Xswiftc -strict-concurrency=minimal | |
| build-arm64: | |
| name: Build (arm64) | |
| needs: test | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Setup Swift 6.2 | |
| uses: swift-actions/setup-swift@7ca6abe6b3b0e8b5421b88be48feee39cbf52c6a # v2 | |
| with: | |
| swift-version: "6.2" | |
| - name: Build release binaries | |
| run: scripts/build-release.sh --arch arm64 --version "${GITHUB_REF_NAME}" --dist-root dist | |
| - name: Upload arm64 artifacts | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: dist-arm64 | |
| path: dist/arm64 | |
| if-no-files-found: error | |
| build-x86_64: | |
| name: Build (x86_64) | |
| needs: test | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Setup Swift 6.2 | |
| uses: swift-actions/setup-swift@7ca6abe6b3b0e8b5421b88be48feee39cbf52c6a # v2 | |
| with: | |
| swift-version: "6.2" | |
| - name: Build release binaries | |
| run: scripts/build-release.sh --arch x86_64 --version "${GITHUB_REF_NAME}" --dist-root dist | |
| - name: Upload x86_64 artifacts | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: dist-x86_64 | |
| path: dist/x86_64 | |
| if-no-files-found: error | |
| release: | |
| name: Package and Publish | |
| needs: | |
| - build-arm64 | |
| - build-x86_64 | |
| runs-on: macos-15 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Setup Swift 6.2 | |
| uses: swift-actions/setup-swift@7ca6abe6b3b0e8b5421b88be48feee39cbf52c6a # v2 | |
| with: | |
| swift-version: "6.2" | |
| - name: Download arm64 artifacts | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| name: dist-arm64 | |
| path: dist/arm64 | |
| - name: Download x86_64 artifacts | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| name: dist-x86_64 | |
| path: dist/x86_64 | |
| - name: Package release archives | |
| run: scripts/package-universal.sh --dist-root dist --output-dir release | |
| - name: Publish Draft GitHub Release | |
| uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2 | |
| with: | |
| files: | | |
| release/*.tar.gz | |
| release/SHA256SUMS.txt | |
| draft: true | |
| generate_release_notes: true |