Skip to content

Commit

Permalink
build: release action that generates the index file
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Nov 15, 2024
1 parent 7f21ac5 commit 26787b5
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/actions/prepare/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Prepare

description: Checkout and install dependencies

runs:
using: composite
steps:
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
shell: bash
run: npm ci
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release

on:
release:
types: [published]
workflow_dispatch:

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Prepare
uses: ./.github/actions/prepare

- name: Build
run: npm run build

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./dist/index.html

0 comments on commit 26787b5

Please sign in to comment.