-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (36 loc) · 1.15 KB
/
release.yml
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
41
42
name: release
on:
workflow_dispatch:
inputs:
version:
description: 'SemVer that will be used for publishing (e.g. "0.0.1")'
required: true
type: string
jobs:
Prepare-Release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Prepare ${{ inputs.version }} release
run: |
git config user.name "think-it-account"
git config user.email "[email protected]"
sed -i 's/"version":.*/"version": "${{ inputs.version }}",/g' package.json
git add .
git commit -m "Prepare release ${{ inputs.version }}"
git push origin main
git tag --force v${{ inputs.version }}
git push --force origin v${{ inputs.version }}
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
tag: ${{ inputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
makeLatest: true
removeArtifacts: true
- name: Publish package
uses: ./.github/action/npm-publish
secrets: inherit