From 358dcc40b7cdfc2b499e6ece7d14d29fbe91de25 Mon Sep 17 00:00:00 2001 From: Oak Date: Tue, 6 Feb 2024 13:39:29 +0000 Subject: [PATCH] ci: add release workflow and artifacts upload (#728) * add release workflow and artifacts upload * fix trunk * trunk ignore --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..aaed316e7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +# trunk-ignore-all(checkov/CKV2_GHA_1) +name: Release + +on: + release: + types: [published] + +jobs: + build-and-upload: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Set up Scarb + uses: software-mansion/setup-scarb@v1 + - name: Build contracts + run: | + scarb build -p contracts + - name: Zip dev artifacts + run: zip -r dev-artifacts.zip target/dev + - name: Upload artifacts to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: dev-artifacts.zip + asset_name: dev-artifacts.zip + tag: ${{ github.ref_name }} + overwrite: true