From babac777d423ac94719e5e5749715806935c6598 Mon Sep 17 00:00:00 2001 From: Jared Holgate Date: Fri, 7 Jun 2024 12:53:33 +0100 Subject: [PATCH] chore: add release action to generate artifacts for accelerator (#788) * Add release action * add pr trigger for testing * Rename action artifact * Add better task names * Update job name * Update to use release created --- .github/workflows/release.yml | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 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..8af3eb6b6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: Artifacts + +on: + release: + types: [ created ] + workflow_dispatch: + pull_request: + branches: + - main + +permissions: + contents: write + +jobs: + release: + name: Generate Accelerator Release Artifacts + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Zip and Tar + run: | + mkdir staging + cp -r accelerator staging + cp -r infra-as-code staging + cd staging + tar -cvzf ../accelerator.tar.gz . + zip -r ../accelerator.zip . + + - name: Upload Artifacts to Action + uses: actions/upload-artifact@v4 + with: + name: accelerator + path: | + accelerator.tar.gz + accelerator.zip + + - name: Add Artifacts to Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + ./accelerator.tar.gz + ./accelerator.zip