Skip to content

Commit

Permalink
remove deprecated actions
Browse files Browse the repository at this point in the history
  • Loading branch information
catoa committed Jan 3, 2025
1 parent 2509881 commit 81eeb6b
Showing 1 changed file with 18 additions and 21 deletions.
39 changes: 18 additions & 21 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,41 +29,38 @@ jobs:
- build: macos
os: macos-latest
target: aarch64-apple-darwin
- build: windows-gnu
os: windows-latest
target: x86_64-pc-windows-gnu
# - build: windows-gnu
# os: windows-latest
# target: x86_64-pc-windows-gnu
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get the release version from the tag
shell: bash
run: echo "VERSION=$(git describe --tags --always)" >> $GITHUB_ENV
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build
uses: actions-rs/cargo@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
use-cross: true
command: build
args: --verbose --release --target ${{ matrix.target }}
toolchain: stable
target: ${{ matrix.target }}
- name: Build the project
run: cargo build --release
- name: Build archive
shell: bash
if: startsWith(github.ref, 'refs/tags/')
run: |
binary_name="checksum"
dirname="$binary_name-${{ env.VERSION }}-${{ matrix.target }}"
mkdir "$dirname"
if [ "${{ matrix.os }}" = "windows-latest" ]; then
mv "target/${{ matrix.target }}/release/$binary_name.exe" "$dirname"
7z a "$dirname.zip" "$dirname"
echo "ASSET=$dirname.zip" >> $GITHUB_ENV
else
mv "target/${{ matrix.target }}/release/$binary_name" "$dirname"
tar -czf "$dirname.tar.gz" "$dirname"
echo "ASSET=$dirname.tar.gz" >> $GITHUB_ENV
fi
# TODO: Resolve issues with windows builds failing
# if [ "${{ matrix.os }}" = "windows-latest" ]; then
# mv "target/${{ matrix.target }}/release/$binary_name.exe" "$dirname"
# 7z a "$dirname.zip" "$dirname"
# echo "ASSET=$dirname.zip" >> $GITHUB_ENV
# else
mv "target/${{ matrix.target }}/release/$binary_name" "$dirname"
tar -czf "$dirname.tar.gz" "$dirname"
echo "ASSET=$dirname.tar.gz" >> $GITHUB_ENV
# fi
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
Expand Down

0 comments on commit 81eeb6b

Please sign in to comment.