FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
github-actions/.github/workflows/node-release.yml at master · node-modules/github-actions · GitHub
node-modules
/
github-actions
Public
forked from
fengmk2/github-actions
Notifications
You must be signed in to change notification settings
Fork
7
Star
3
Code
Issues
3
Pull requests
8
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
github-actions
/
.github
/
workflows
/
node-release.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
101 lines (86 loc) · 2.74 KB
Breadcrumbs
github-actions
/
.github
/
workflows
/
node-release.yml
Copy path
File metadata and controls
101 lines (86 loc) · 2.74 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
name
:
Node.js Release
on
:
workflow_call
:
secrets
:
NPM_TOKEN
:
description
:
'
npm token
'
required
:
false
GIT_TOKEN
:
description
:
'
github personal token
'
required
:
true
inputs
:
checkTest
:
type
:
boolean
description
:
whether run test before release
default
:
false
dryRun
:
type
:
boolean
description
:
pass dry-run to semantic-release
default
:
false
install
:
type
:
string
description
:
'
Install dependencies script
'
default
:
'
npm i --no-package-lock --no-fund --force && rm -rf package-lock.json
'
action_ref
:
type
:
string
description
:
'
Branch name for node-modules/github-actions, for test purpose
'
default
:
master
jobs
:
Release
:
permissions
:
contents
:
write
id-token
:
write
deployments
:
write
runs-on
:
ubuntu-latest
defaults
:
run
:
working-directory
:
main_repo
concurrency
:
group
:
${{ github.workflow }}-${{ github.ref }}
cancel-in-progress
:
true
steps
:
#
Checkout action repository
-
name
:
Checkout action repository
uses
:
actions/checkout@v7
with
:
repository
:
node-modules/github-actions
path
:
action_repo
ref
:
${{ inputs.action_ref }}
#
Checkout project repository
-
name
:
Checkout project repository
uses
:
actions/checkout@v7
with
:
path
:
main_repo
token
:
${{ secrets.GIT_TOKEN }}
#
Setup Node.js environment
-
name
:
Setup Node.js
uses
:
actions/setup-node@v7
with
:
node-version
:
lts/*
package-manager-cache
:
false
#
Install action dependencies
-
name
:
Install action dependencies
run
:
npm i --no-package-lock --no-fund --omit=dev
working-directory
:
action_repo/scripts/release
#
Install dependencies
-
name
:
Install dependencies
run
:
${{ inputs.install }}
#
Run Test Only
-
name
:
Run Test
run
:
npm test
if
:
inputs.checkTest
-
name
:
Semantic Release
id
:
release
run
:
node ../action_repo/scripts/release/index.js
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN
:
${{ secrets.NPM_TOKEN }}
DRYRUN
:
${{ inputs.dryRun }}
NPM_CONFIG_PROVENANCE
:
true
-
name
:
Publish ${{ steps.release.outputs.name }}@${{ steps.release.outputs.release_version }}
if
:
steps.release.outputs.release_version && !inputs.dryRun
run
:
|
echo ${{ steps.release.outputs.name }}
echo ${{ steps.release.outputs.release_version }}
echo ${{ steps.release.outputs.registry }}
echo ${{ steps.release.outputs.cnpm_sync_url }}
Back
|
FazBrowse Home
|
New Git URL