-
-
Notifications
You must be signed in to change notification settings - Fork 11
47 lines (44 loc) · 1.54 KB
/
publish.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
41
42
43
44
45
46
47
name: Publish
on:
release:
types: [created] # will be triggered when a NON-draft release is created and published.
jobs:
publish-npm:
name: Publish to npm registry
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: master # otherwise it defaults to the version tag missing bump commit
fetch-depth: 0 # fetch all history
- name: Checkout to bump commit
run: git checkout "$(git rev-list "${{ github.event.release.tag_name }}"..master | tail -1)"
- uses: actions/setup-node@v1
with:
node-version: 14.x
registry-url: https://registry.npmjs.org/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
publish-docker:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: master # otherwise it defaults to the version tag missing bump commit
fetch-depth: 0 # fetch all history
- name: Checkout to bump commit
run: git checkout "$(git rev-list "${{ github.event.release.tag_name }}"..master | tail -1)"
- uses: actions/setup-node@v1
with:
node-version: 14.x
registry-url: https://registry.npmjs.org/
- name: Push to Docker Hub
uses: docker/build-push-action@v1
with:
username: undergroundwires
password: ${{ secrets.DOCKER_PASSWORD }}
repository: undergroundwires/bump-everywhere
tag_with_ref: true
tags: latest