Skip to content

Commit 55b9650

Browse files
committed
chore: add github actions for release/etc
1 parent b0cd1d3 commit 55b9650

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

.github/workflows/publish.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Publish to npm
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-node@v1
11+
with:
12+
node-version: '18.x'
13+
registry-url: 'https://registry.npmjs.org'
14+
- run: npm publish --access public
15+
env:
16+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release_on_tag.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: 'Release on tag'
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
7+
jobs:
8+
release:
9+
permissions:
10+
contents: write
11+
if: startsWith(github.ref, 'refs/tags/')
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Build Changelog
15+
id: github_release
16+
uses: mikepenz/release-changelog-builder-action@v5
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
19+
20+
- name: Create Release
21+
uses: actions/create-release@v1
22+
with:
23+
tag_name: ${{ github.ref }}
24+
release_name: ${{ github.ref }}
25+
body: ${{steps.github_release.outputs.changelog}}
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Pull Request Labels
2+
on:
3+
pull_request:
4+
types: [opened, labeled, unlabeled, synchronize]
5+
jobs:
6+
label:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: mheap/github-action-required-labels@v1
10+
with:
11+
mode: exactly
12+
count: 1
13+
labels: "fix, feature, doc, chore, test, ignore, other, dependencies"

0 commit comments

Comments
 (0)