-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.17 KB
/
main.yaml
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
name: Publish npm package
on:
push:
# Sequence of patterns matched against refs/heads
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v2
env:
RUNNER_TEMP: /tmp #TODO: REMOVE THIS BEFORE COMMITING.
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
scope: '@g-loot'
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$( git describe --tag --abbrev=0 )
- run: git describe --tag --abbrev=0
- run: npm --no-git-tag-version version $( git describe --tag --abbrev=0 )
- name: publish-npm
run: npm run deploy:framework --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/setup-node@v2
with:
node-version: '12.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@g-loot'
- name: publish-git
run: npm run deploy:framework
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}