-
Notifications
You must be signed in to change notification settings - Fork 0
127 lines (111 loc) · 3.44 KB
/
Copy pathrelease.yml
File metadata and controls
127 lines (111 loc) · 3.44 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: Release
on:
pull_request:
types:
- closed
branches:
- main
env:
REGISTRY: ghcr.io
ORG_NAME: ${{ github.repository_owner }}
IMAGE_NAME: ${{ github.event.repository.name }}
CONFIG_FILE: kubernetes/nanoforge/editor-override.yaml
PUBLIC_MODE: ${{ vars.PUBLIC_MODE }}
PUBLIC_PM_URL: ${{ vars.PUBLIC_PM_URL }}
PUBLIC_DOCS_URL: ${{ vars.PUBLIC_DOCS_URL }}
PUBLIC_LANDING_URL: ${{ vars.PUBLIC_LANDING_URL }}
permissions:
contents: write
packages: write
attestations: write
id-token: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
if: github.repository_owner == 'NanoForge-dev' && github.event.pull_request.merged == true && startsWith(github.head_ref, 'releases/')
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Prepare
uses: ./.github/actions/prepare
env:
PUBLIC_MODE: ${{ vars.PUBLIC_MODE }}
PUBLIC_PM_URL: ${{ vars.PUBLIC_PM_URL }}
- name: Release packages
uses: ./node_modules/@nanoforge-dev/actions/actions/release-packages
with:
packages: '@nanoforge-dev/editor'
tag-format: '{version}'
latest: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
beta-release:
name: Beta release
runs-on: ubuntu-latest
if: github.repository_owner == 'NanoForge-dev' && github.event.pull_request.merged == true && !startsWith(github.head_ref, 'releases/')
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Prepare
uses: ./.github/actions/prepare
- name: Release beta
uses: ./node_modules/@nanoforge-dev/actions/actions/release-dev
with:
package: '@nanoforge-dev/editor'
tag: beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
push-image:
name: Push image
runs-on: ubuntu-latest
if: github.repository_owner == 'NanoForge-dev'
needs: [release]
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
- name: Push Docker image
uses: ./.github/actions/docker-push
with:
target: editor
registry: ${{ env.REGISTRY }}
image: ${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}
token: ${{ secrets.TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
config-file: ${{ env.CONFIG_FILE }}
args: |
PUBLIC_MODE
PUBLIC_PM_URL
PUBLIC_DOCS_URL
PUBLIC_LANDING_URL
publish-docs:
name: Publish docs
runs-on: ubuntu-latest
if: github.repository_owner == 'NanoForge-dev'
needs: [push-image]
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
- name: Checkout docs repository
uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
path: docs-dist
repository: nanoforge-dev/docs
token: ${{ secrets.ACTIONS_KEY }}
- name: Prepare
uses: ./.github/actions/prepare
- name: Publish docs
uses: ./node_modules/@nanoforge-dev/actions/actions/synchronize-docs
with:
repository: editor
category: editor