forked from TheBlueMatt/dnssec-prover
-
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.
Upload release artifacts to releases
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: published | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: cachix/install-nix-action@v27 | ||
- uses: cachix/cachix-action@v15 | ||
with: | ||
name: devenv | ||
- name: Install devenv.sh | ||
run: nix profile install nixpkgs#devenv | ||
|
||
- name: Build bindings | ||
run: | | ||
devenv shell -- bash -c "cd uniffi && uniffi-bindgen-cs --config ./uniffi.toml ./src/interface.udl && cargo build --release" | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Archive production artifacts | ||
run: tar czvf dnssec_prover-${{ github.ref_name }}-${{ runner.arch }}.tar.gz -C uniffi/src dnssec_prover.cs -C uniffi/target/release libdnssec_prover_uniffi.* | ||
working-directory: uniffi | ||
|
||
- name: Upload Release Asset | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: ./uniffi/dnssec_prover-${{ github.ref_name }}-${{ runner.arch }}.tar.gz |