Skip to content

Commit

Permalink
chore: add release action to generate artifacts for accelerator (Azur…
Browse files Browse the repository at this point in the history
…e#788)

* Add release action

* add pr trigger for testing

* Rename action artifact

* Add better task names

* Update job name

* Update to use release created
  • Loading branch information
jaredfholgate authored Jun 7, 2024
1 parent 80484be commit babac77
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit babac77

Please sign in to comment.