chore: add github release action #1
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: Make release | |
permissions: | |
contents: write | |
on: | |
push: | |
branches: ["release"] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: npm ci | |
- run: npm run build | |
- name: Release | |
run: | | |
version=$(node -e "console.log(require('./theme.json').version)") | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add static | |
git commit -m "chore: release $version" | |
git tag $version | |
git push origin $version |