forked from Azure/ALZ-Bicep
-
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.
chore: add release action to generate artifacts for accelerator (Azur…
…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
1 parent
80484be
commit babac77
Showing
1 changed file
with
44 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,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 |