-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (63 loc) · 2.07 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: CI Release
run-name: Release
on:
push:
branches:
- main
jobs:
package-release:
name: Package Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository 🛎️
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build 🏗️
uses: ./.github/actions/build
- name: Create .npmrc 📝
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
echo "git-checks=false" >> .npmrc
- name: Bump version 📝
run: pnpm bump-version
- name: Publish to registry 🚀
run: pnpm release
- name: Sync release info 📝
id: sync_release
run: |
tag=v$(node -e "console.log(require('./package.json').version)")
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git config pull.ff true
git add . && git commit -m "CI: @sliit-foss/automatic-versioning - sync release" || true
git tag $tag || true
git pull --rebase && git push origin
echo "tag=$tag" >> $GITHUB_OUTPUT
- name: Create release on GitHub 📝
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
skipIfReleaseExists: true
makeLatest: true
tag: ${{steps.sync_release.outputs.tag}}
site-release:
name: Site Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository 🛎️
uses: actions/checkout@v4
- name: Build 🏗️
uses: ./.github/actions/build
with:
storybooks: true
- name: Create .nojekyll file 🚧
run: touch ./storybook-static/.nojekyll
- name: Fix 404 on page reload 🚧
run: cp storybook-static/index.html storybook-static/404.html
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./storybook-static/
branch: gh-pages
clean-exclude: preview