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