-
-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (45 loc) · 1.88 KB
/
main.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
43
44
45
name: Release Stable
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
if: "!startsWith(github.event.head_commit.message, '[🚀 Release]')"
steps:
- uses: actions/checkout@main
with:
token: ${{ secrets.GIT_TOKEN }}
- uses: actions/setup-node@main
with:
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"
- run: git config --global user.name 'Patryk Rzucidlo (@PTKDev)'
- run: git config --global user.email '[email protected]'
- run: npm ci
- run: npm run github-workflow-next-version -- --cmd main
- run: npm run release
- run: npm run pre-commit
- id: pkgjson
run: chmod +x ./scripts/version.sh && ./scripts/version.sh
- run: git add . && git commit -m "[🚀 Release] v${{ steps.pkgjson.outputs.pkgversion }}" && git push
- run: npm publish --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Get current date
id: date
run: echo "date=$(date +'%B %d, %Y')" >> $GITHUB_OUTPUT
- run: echo "### CHANGELOG:" "v${{ steps.pkgjson.outputs.pkgversion }} (${{ steps.date.outputs.date }})" >> CHANGELOG_RELEASE.md
- run: npm run github-workflow-changelog
- name: Release snapshot
id: release-snapshot
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: ${{ steps.pkgjson.outputs.pkgversion }}
name: v${{ steps.pkgjson.outputs.pkgversion }}
bodyFile: CHANGELOG_RELEASE.md
draft: false
prerelease: false