v2.0.8 #15
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
| # Builds the theme zip and uploads it as a release asset whenever a GitHub | |
| # Release is published. Uses only the built-in GITHUB_TOKEN. | |
| name: Release Zip | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| build-and-attach: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v5.0.0 | |
| with: | |
| version: 9 | |
| run_install: false | |
| - name: Enable corepack | |
| run: corepack enable | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build assets | |
| run: pnpm run build | |
| - name: Test theme | |
| run: pnpm dlx gscan@latest --v6 --canary --verbose -z ./logly-*.zip | |
| - name: Upload release asset | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| # Get name and version from package.json | |
| NAME=$(node -p "require('./package.json').name") | |
| VERSION=$(node -p "require('./package.json').version") | |
| ZIP_NAME="${NAME}-${VERSION}.zip" | |
| echo "Uploading $ZIP_NAME to release ${{ github.event.release.tag_name }}..." | |
| if [ -f "$ZIP_NAME" ]; then | |
| gh release upload "${{ github.event.release.tag_name }}" "$ZIP_NAME" --clobber | |
| else | |
| echo "Error: $ZIP_NAME not found!" | |
| exit 1 | |
| fi |