Publish release on tag push #24
Workflow file for this run
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
name: Publish release on tag push | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
RELEASE_FILE_NAME: 'css-pokemon-gameboy-${{ github.ref_name }}.zip' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build the css to dist-release | |
run: npm run build:css | |
- name: Zip Release | |
uses: TheDoctor0/[email protected] | |
with: | |
type: 'zip' | |
filename: ${{ env.RELEASE_FILE_NAME }} | |
path: 'template.html styles' | |
directory: 'dist-release' | |
- name: Create Release on GitHub | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: 'dist-release/${{ env.RELEASE_FILE_NAME }}' | |
removeArtifacts: true | |
body: 'Automatic release created by GitHub Action.' | |
prerelease: true |