forked from spacesprotocol/spaces
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1461d98
commit ddf882b
Showing
3 changed files
with
69 additions
and
49 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Release macOs (arm) | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
|
||
jobs: | ||
release: | ||
runs-on: macos-13 | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Dynamically create a tag from the pushed version | ||
- name: Get the tag name | ||
id: get_tag | ||
run: | | ||
echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
- name: Set up Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
|
||
- name: Build release binary | ||
run: cargo build --release | ||
|
||
# Perhaps we can not run tests, as they are run by the CI workflow | ||
# - name: Run tests | ||
# run: cargo test --release | ||
|
||
- name: Get architecture | ||
id: get_arch | ||
run: echo "::set-output name=arch::$(uname -m)" | ||
|
||
- name: Get OS | ||
id: get_os | ||
run: echo "::set-output name=os::$(uname -s | tr '[:upper:]' '[:lower:]')" | ||
|
||
- name: Create release archive | ||
run: | | ||
mkdir -p release | ||
ARCH="${{ steps.get_arch.outputs.arch }}" | ||
OS="${{ steps.get_os.outputs.os }}" | ||
cp target/release/spaced release/spaced-${{ env.TAG }}-${OS}-${ARCH} | ||
cp target/release/space-cli release/space-cli-${{ env.TAG }}-${OS}-${ARCH} | ||
- name: Create GitHub Release | ||
id: create_release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: ${{ env.TAG }} # Dynamically use the pushed tag | ||
name: Release ${{ env.TAG }} # Use the tag for the release name | ||
body: | | ||
Automated release of version ${{ env.TAG }}. | ||
draft: false | ||
prerelease: false | ||
files: | | ||
release/spaced-${{ env.TAG }}-${{ steps.get_os.outputs.os }}-${{ steps.get_arch.outputs.arch }} | ||
release/space-cli-${{ env.TAG }}-${{ steps.get_os.outputs.os }}-${{ steps.get_arch.outputs.arch }} | ||
make_latest: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |