v1.0.3 #144
Workflow file for this run
This file contains hidden or 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
| --- | |
| name: Release | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| release: | |
| name: Generate Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Zip and Tar | |
| run: | | |
| mkdir staging | |
| cp -r templates staging/templates | |
| cp -r tests staging/tests | |
| cp -r .config staging/.config | |
| cp bicepconfig.json staging/bicepconfig.json | |
| cd staging | |
| tar -cvzf ../starter_modules.tar.gz . | |
| zip -r ../starter_modules.zip . | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: starter_modules | |
| path: | | |
| starter_modules.tar.gz | |
| starter_modules.zip | |
| - name: Check for Valid Git Ref | |
| if: github.event_name != 'pull_request' | |
| run: | | |
| $gitRef = "${{ github.ref }}" | |
| if (!$gitRef.StartsWith("refs/tags/")) { | |
| Write-Error "Invalid Git ref $gitRef" | |
| exit 1 | |
| } else { | |
| Write-Output "Valid Git ref $gitRef" | |
| } | |
| shell: pwsh | |
| - name: Release | |
| uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0 | |
| if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: | | |
| ./starter_modules.tar.gz | |
| ./starter_modules.zip |