Skip to content

Commit

Permalink
build: add Github Action release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
kalvn committed Dec 24, 2024
1 parent 5e00dec commit 5c03319
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release Shaarli Material

on:
push:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+(-.*)?'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"

- name: Build plugin
run: |
npm install
npm run build
- name: Package
run: |
tag="${GITHUB_REF#refs/tags/}"
zip -r shaarli-material.$tag.zip material
tar -czvf shaarli-material.$tag.tar.gz material
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag="${GITHUB_REF#refs/tags/}"
gh release create "$tag" \
--title="$tag" \
--draft \
shaarli-material.$tag.zip shaarli-material.$tag.tar.gz

0 comments on commit 5c03319

Please sign in to comment.