-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.25 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Release plugin archives
on:
push:
branches:
- '**'
jobs:
ci:
name: Release
runs-on: ubuntu-latest
env:
RELEASE: ${{ github.event_name == 'push' && contains('main,master', github.ref_name) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: mathieudutour/[email protected]
name: Calculate next version and create tag on GitHub
id: tag
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_branches: 'main,master'
dry_run: ${{ env.RELEASE != 'true' }}
- name: Install dependencies
run: yarn install
- name: Build all plugins
run: yarn workspaces run build
- name: Package all plugins
run: |
mkdir release && cd dist && for PLUGIN in * ; do
zip -r ../release/$PLUGIN-${{ steps.tag.outputs.new_version }}.zip $PLUGIN
done
- name: Make GitHub Release
if: ${{ env.RELEASE == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ steps.tag.outputs.new_tag }} ./release/*.zip --target=${{ github.sha }} --title="${{ steps.tag.outputs.new_tag }}" --notes="${{ steps.tag.outputs.changelog }}"