Skip to content

Commit 6338d5e

Browse files
committed
chore: add release workflows to make releases more easyly
1 parent 89e1b53 commit 6338d5e

File tree

2 files changed

+117
-0
lines changed

2 files changed

+117
-0
lines changed

.github/workflows/beta.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Prerelease Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- beta
7+
workflow_dispatch: # Allows manual release trigger
8+
9+
jobs:
10+
versioning:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Code
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v2
20+
with:
21+
node-version: '21'
22+
23+
- name: Install Dependencies
24+
run: yarn install --frozen-lockfile
25+
26+
- name: Build plugin
27+
run: yarn build
28+
29+
- name: Semantic Release (Versioning)
30+
run: npx semantic-release --dry-run
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
34+
35+
publish:
36+
runs-on: ubuntu-latest
37+
needs: versioning # Stellt sicher, dass die Versionierung abgeschlossen ist
38+
if: github.event_name == 'workflow_dispatch' # Führt diesen Job nur bei manuellem Auslöser aus
39+
steps:
40+
- name: Checkout Code
41+
uses: actions/checkout@v2
42+
43+
- name: Setup Node.js
44+
uses: actions/setup-node@v2
45+
with:
46+
node-version: '21'
47+
registry-url: 'https://registry.npmjs.org'
48+
49+
- name: Install Dependencies
50+
run: yarn install --frozen-lockfile
51+
52+
- name: Build plugin
53+
run: yarn build
54+
55+
- name: Publish to NPM
56+
run: npx semantic-release
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Release Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch: # Allows manual release trigger
8+
9+
jobs:
10+
versioning:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Code
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v2
20+
with:
21+
node-version: '21'
22+
23+
- name: Install Dependencies
24+
run: yarn install --frozen-lockfile
25+
26+
- name: Build plugin
27+
run: yarn build
28+
29+
- name: Semantic Release (Versioning)
30+
run: npx semantic-release --dry-run
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
34+
publish:
35+
runs-on: ubuntu-latest
36+
needs: versioning # Stellt sicher, dass die Versionierung abgeschlossen ist
37+
if: github.event_name == 'workflow_dispatch' # Führt diesen Job nur bei manuellem Auslöser aus
38+
steps:
39+
- name: Checkout Code
40+
uses: actions/checkout@v2
41+
42+
- name: Setup Node.js
43+
uses: actions/setup-node@v2
44+
with:
45+
node-version: '21'
46+
registry-url: 'https://registry.npmjs.org'
47+
48+
- name: Install Dependencies
49+
run: yarn install --frozen-lockfile
50+
51+
- name: Build plugin
52+
run: yarn build
53+
54+
- name: Publish to NPM
55+
run: npx semantic-release
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)