-
-
Notifications
You must be signed in to change notification settings - Fork 0
141 lines (116 loc) · 5.04 KB
/
npm-publish.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
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: "📦 Publish › NPM Package"
run-name: "📦 Publish › NPM Package"
on:
workflow_dispatch:
inputs:
# ---------------------------------------------------------------------------------------
# Name of the plugin to use when creating the release zip filename
# e.g: marked-alert-fa-v1.0.0.zip
# ---------------------------------------------------------------------------------------
PLUGIN_NAME:
description: "📦 Name of Plugin"
required: true
default: 'marked-alert-fa'
type: string
# ---------------------------------------------------------------------------------------
# ENABLE: the changelog generated in releases tab will only display single commits.
# DISABLE: the changelog shows pull requests completed based on their labels
# ---------------------------------------------------------------------------------------
CHANGELOG_MODE_COMMIT:
description: "📑 Use Commits Instead of PRs"
required: true
default: true
type: boolean
# ---------------------------------------------------------------------------------------
# ENABLE: Will show all types of commits, including uncategorized
# DISABLE: WIll only show actions that have been categorized using the format
# type(scope): description
# type: description
# ---------------------------------------------------------------------------------------
SHOW_UNCATEGORIZED:
description: "🗂️ Show Uncategorized Commits"
required: true
default: false
type: boolean
# ---------------------------------------------------------------------------------------
# ENABLE: released version will be marked as pre-release
# DISABLE: release version will be marked as stable / normal release
# ---------------------------------------------------------------------------------------
PRERELEASE:
description: "🧪 Build RC (Pre-release)"
required: true
default: false
type: boolean
# ---------------------------------------------------------------------------------------
# Release Candidate version number
# this will be added to the end of your released app in the releases page.
# e.g: marked-alert-fa-v1.0.0-rc.1
# ---------------------------------------------------------------------------------------
VERSION_RC:
description: "🧪 RC (Pre-release) Ver (marked-alert-fa-rc.v1)"
required: false
type: string
default: "1"
jobs:
# ---------------------------------------------------------------------------------------
# JOB > INITIALIZE
# ---------------------------------------------------------------------------------------
job-initialize:
name: >-
📦 Publish › Initialize
runs-on: ubuntu-latest
outputs:
package_version: ${{ steps.task_initialize_package_getversion.outputs.PACKAGE_VERSION }}
permissions:
contents: write
packages: write
steps:
- name: "✅ Start"
id: task_initialize_start
run: |
echo "Starting build"
# ---------------------------------------------------------------------------------------
# Job > Initialize > Checkout
# ---------------------------------------------------------------------------------------
- name: "☑️ Checkout"
id: task_initialize_checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# ---------------------------------------------------------------------------------------
# JOB > PUBLISH > GITHUB PACKAGE
# ---------------------------------------------------------------------------------------
job-publish-gpr:
name: >-
📦 Package › Github
needs: job-initialize
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: "☑️ Checkout"
id: task_gpr_checkout
uses: actions/checkout@v4
- name: "⚙️ Setup Node"
id: task_gpr_node_setup
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://npm.pkg.github.com/'
scope: '@aetherinox'
- name: "🎚️ NPM › Install"
id: task_gpr_install
run: |
npm init -y --scope @aetherinox
npm install
- name: "📂 List Files"
id: task_gpr_publish_list
run: |
cat /home/runner/work/_temp/.npmrc
- name: "📦 Publish › Live"
id: task_gpr_publish_run_live
run: |
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.SELF_TOKEN }}