Bump version to 2.17.0 #80
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
on: | |
push: | |
tags: | |
- "*" | |
name: Release | |
env: | |
# TODO: Load from `.swift-version` file | |
SWIFT_VERSION: 5.9 | |
jobs: | |
create_release: | |
name: Create Release | |
runs-on: ubuntu-latest | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
tag_name: ${{ steps.get_version.outputs.version }} | |
steps: | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
- id: get_version | |
uses: battila7/get-version-action@v2 | |
macos: | |
name: Release macOS | |
runs-on: macos-14 | |
needs: create_release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: swift-actions/setup-swift@v2 | |
with: | |
swift-version: ${{ env.SWIFT_VERSION }} | |
- name: Build & Package | |
run: make package | |
- name: Darwin Universal | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_path: release/xcbeautify.zip | |
asset_name: xcbeautify-${{ needs.create_release.outputs.tag_name }}-universal-apple-macosx.zip | |
asset_content_type: application/zip | |
- name: Darwin x86_64 | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_path: .build/x86_64-apple-macosx/release/xcbeautify.zip | |
asset_name: xcbeautify-${{ needs.create_release.outputs.tag_name }}-x86_64-apple-macosx.zip | |
asset_content_type: application/zip | |
- name: Darwin arm64 | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_path: .build/arm64-apple-macosx/release/xcbeautify.zip | |
asset_name: xcbeautify-${{ needs.create_release.outputs.tag_name }}-arm64-apple-macosx.zip | |
asset_content_type: application/zip | |
ubuntu_x86_64: | |
name: Release Linux x86_64 | |
runs-on: ubuntu-22.04 | |
needs: create_release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download Swift ${{ env.SWIFT_VERSION }} | |
run: wget https://download.swift.org/swift-${{ env.SWIFT_VERSION }}-release/ubuntu2204/swift-${{ env.SWIFT_VERSION }}-RELEASE/swift-${{ env.SWIFT_VERSION }}-RELEASE-ubuntu22.04.tar.gz | |
- name: Extract Swift ${{ env.SWIFT_VERSION }} | |
run: tar xzf swift-${{ env.SWIFT_VERSION }}-RELEASE-ubuntu22.04.tar.gz | |
- name: Add Swift toolchain to PATH | |
run: echo "$GITHUB_WORKSPACE/swift-${{ env.SWIFT_VERSION }}-RELEASE-ubuntu22.04/usr/bin" >> $GITHUB_PATH | |
- name: Package Linux x86_64 | |
run: make package-linux-x86_64 | |
- name: Upload Release Asset for Linux x86_64 | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_path: xcbeautify.tar.xz | |
asset_name: xcbeautify-${{ needs.create_release.outputs.tag_name }}-x86_64-unknown-linux-gnu.tar.xz | |
asset_content_type: application/x-xz |