Bump version to 1.4.6 #5
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: Release | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build: | |
name: Build on ${{ matrix.os }} for ${{ matrix.arch }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: macos-latest | |
artifact_name: macism-x86_64 | |
asset_name: macism-x86_64 | |
arch: x86_64 | |
- os: macos-latest | |
artifact_name: macism-arm64 | |
asset_name: macism-arm64 | |
arch: arm64 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Get version | |
id: get_version | |
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
- name: Build | |
run: | | |
target="" | |
if [[ ( "${{ matrix.arch }}" == "x86_64" ) ]]; then | |
export target="x86_64" | |
else | |
export target="aarch64" | |
fi | |
swiftc -target ${target}-apple-macos11 -o macism-${{ matrix.arch }} macism.swift | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.asset_name }} | |
path: ${{ matrix.artifact_name }} | |
release: | |
name: Create Release | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Get version | |
id: get_version | |
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v2 | |
with: | |
token: ${{ secrets.RELEASE_TOKEN }} | |
name: Release ${{ steps.get_version.outputs.VERSION }} | |
tag_name: ${{ steps.get_version.outputs.VERSION }} | |
draft: false | |
prerelease: false | |
- name: Download all artifacts | |
uses: actions/download-artifact@v4 | |
- name: Display structure of downloaded files | |
run: ls -R | |
- name: Upload Release Asset X86_64 | |
uses: softprops/action-gh-release@v2 | |
with: | |
token: ${{ secrets.RELEASE_TOKEN }} | |
files: macism-x86_64/macism-x86_64 | |
- name: Upload Release Asset Arm64 | |
uses: softprops/action-gh-release@v2 | |
with: | |
token: ${{ secrets.RELEASE_TOKEN }} | |
files: macism-arm64/macism-arm64 |