Skip to content

Commit 8c7f8ec

Browse files
committed
release workflow
1 parent c0e915f commit 8c7f8ec

File tree

4 files changed

+54
-1
lines changed

4 files changed

+54
-1
lines changed

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ko_fi: garlicteam

.github/PULL_REQUEST_TEMPLATE.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
**Please describe the changes this PR makes and why it should be merged:**
2+
3+
4+
**Status and versioning classification:**
5+
6+
<!--
7+
Please move lines that apply to you out of the comment:
8+
- I know how to update typings and have done so, or typings don't need updating
9+
- This PR changes the library's interface (methods or parameters added)
10+
- This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
11+
- This PR **only** includes non-code changes, like changes to documentation, README, etc.
12+
-->

.github/workflows/release.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "Release"
2+
3+
on: [workflow_dispatch]
4+
5+
jobs:
6+
release:
7+
name: publish
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: checkout
11+
uses: actions/checkout@v2
12+
- name: node
13+
uses: actions/setup-node@v2
14+
with:
15+
node-version: 12
16+
registry-url: https://registry.npmjs.org/
17+
18+
- name: Install
19+
run: npm install ci
20+
21+
- name: build
22+
run: npm run build
23+
24+
- name: Get version & asign
25+
id: get_version
26+
run: |
27+
variable=$(jq --raw-output '.version' package.json)
28+
echo ::set-output name=version::$variable
29+
30+
- name: Publish releases
31+
uses: ncipollo/release-action@v1
32+
with:
33+
tag: ${{ steps.get_version.outputs.version }}
34+
name: ${{ steps.get_version.outputs.version }}
35+
token: ${{ secrets.GITHUB_TOKEN }}
36+
37+
- name: Publish NPM
38+
run: npm publish --access public
39+
env:
40+
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "gcommands-cli",
2+
"name": "@gcommands/cli",
33
"version": "0.1.0-nextdev",
44
"description": "",
55
"type": "module",

0 commit comments

Comments
 (0)