changelog #41
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: Create Release | |
| on: # zizmor: ignore[concurrency-limits] | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: {} | |
| jobs: | |
| build: # zizmor: ignore[anonymous-definition] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # create GitHub release and upload assets | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - name: Install Composer Dependencies | |
| run: composer install | |
| - name: Install NPM Dependencies | |
| run: npm ci | |
| - name: Compile assets | |
| run: npm run build | |
| - name: Create zip | |
| run: cd resources && tar -czvf dist.tar.gz dist | |
| - name: Get Changelog | |
| id: changelog | |
| uses: statamic/changelog-action@5d112d0d790cdeeb5adca3e584e37edc474ab51b # v1 | |
| with: | |
| version: ${{ github.ref }} | |
| - name: Create release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| RELEASE_VERSION: ${{ steps.changelog.outputs.version }} | |
| RELEASE_NOTES: ${{ steps.changelog.outputs.text }} | |
| run: | | |
| PRERELEASE="" | |
| if [[ "$RELEASE_VERSION" == *-beta* ]]; then PRERELEASE="--prerelease"; fi | |
| gh release create "$RELEASE_VERSION" \ | |
| --title "$RELEASE_VERSION" \ | |
| --notes "$RELEASE_NOTES" \ | |
| $PRERELEASE \ | |
| ./resources/dist.tar.gz |