Repository navigation
86 lines (74 loc) · 2.38 KB
/
Copy pathrelease.yml
File metadata and controls
86 lines (74 loc) · 2.38 KB
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
77
78
79
80
81
82
83
84
85
86
name: 🚀 Release
on:
workflow_dispatch:
permissions: {}
jobs:
ci:
uses: ./.github/workflows/__shared-ci.yml
permissions:
contents: read
id-token: write
pull-requests: write
security-events: write
secrets: inherit
release:
name: 🚀 Release
needs: ci
runs-on: ubuntu-latest
environment: github-pages
permissions:
contents: write
pull-requests: write
issues: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: hoverkraft-tech/ci-github-nodejs/actions/setup-node@775ce0902c528062cc94141dd7d13261083b752a # 0.22.0
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
artifact-ids: ${{ needs.ci.outputs.build-artifact-id }}
path: /
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0
id: release
with:
release-type: node
target-branch: main
skip-github-release: true
- name: 📦 Publish NPM packages
if: ${{ steps.release.outputs.release_created }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
run: npm publish --access public
docs-publish:
needs: ci
name: 📖 Publish documentation
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deploy.outputs.url }}
outputs:
url: ${{ steps.deploy.outputs.url }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
artifact-ids: ${{ needs.ci.outputs.build-artifact-id }}
path: /
- id: deploy
uses: hoverkraft-tech/ci-github-publish/actions/deploy/github-pages@b56be562f38e0e3e712f09691a8fe930aae9db1b # 0.22.0
with:
build-path: "docs"
deploy-checks:
needs: docs-publish
uses: hoverkraft-tech/ci-github-publish/.github/workflows/deploy-checks.yml@b56be562f38e0e3e712f09691a8fe930aae9db1b # 0.22.0
permissions:
contents: read
id-token: write
with:
url: ${{ needs.docs-publish.outputs.url }}