Build Swift Release #11
Workflow file for this run
This file contains 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 Swift Release | |
on: | |
release: | |
types: [published] | |
env: | |
SWIFT_VERSION: ${{ github.event.release.tag_name }} | |
SWIFT_TAG: swift-${{ github.event.release.tag_name }}-RELEASE | |
SWIFT_WORKSPACE_CACHE: swift-workspace | |
jobs: | |
fetch-sources: | |
name: Fetch Swift Sources | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/checkout-swift | |
name: "Restore or Checkout ${{ env.SWIFT_VERSION }}" | |
with: | |
swift-tag: ${{ env.SWIFT_TAG }} | |
swift-workspace-cache: ${{ env.SWIFT_WORKSPACE_CACHE }} | |
build-for-distribution: | |
strategy: | |
matrix: | |
distribution: [ | |
"debian-bullseye", | |
"debian-bookworm", | |
"ubuntu-focal", | |
"ubuntu-jammy", | |
"ubuntu-noble" | |
] | |
name: Build Swift | |
runs-on: ubuntu-latest | |
needs: [fetch-sources] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Generate Builder Container | |
shell: bash | |
run: | | |
source ./swift-builder/swift-builder-common | |
./swift-builder/build-container.sh | |
- uses: ./.github/actions/build-for-distribution | |
name: "Build & Publish Swift ${{ env.SWIFT_VERSION }}" | |
with: | |
swift-tag: ${{ env.SWIFT_TAG }} | |
swift-workspace-cache: ${{ env.SWIFT_WORKSPACE_CACHE }} | |
distribution: ${{ matrix.distribution }} | |
builder-tag: ${{ env.SWIFT_VERSION }} | |
- name: Update Release ${{ env.SWIFT_VERSION }} | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
name: Swift ${{ env.SWIFT_VERSION }} for armv7 | |
tag: ${{ env.SWIFT_VERSION }} | |
commit: ${{ github.sha }} | |
artifactErrorsFailBuild: true | |
artifacts: "*.tar.gz" | |
body: "See the [README](https://github.com/xtremekforever/swift-armv7#continuous-integration) for more information on build artifacts." |