-
Notifications
You must be signed in to change notification settings - Fork 17
42 lines (38 loc) · 1.23 KB
/
release.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
name: Build, Test and Publish
on:
workflow_dispatch:
push:
branches:
- 'master'
jobs:
build-test-publish:
env:
GH_TOKEN: ${{secrets.GH_TOKEN}}
GH_USER: ${{secrets.GH_USER}}
GH_EMAIL: ${{secrets.GH_EMAIL}}
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn test
- name: 'Setup git coordinates'
run: |
git remote set-url origin https://uport-project:$GH_TOKEN@github.com/uport-project/uport-did-driver.git
git config user.name $GH_USER
git config user.email $GH_EMAIL
- name: Login to DockerHub Registry
run: echo $DOCKERHUB_PASSWORD | docker login -u $DOCKERHUB_USERNAME --password-stdin
- name: Push the tagged Docker image
if: github.ref == 'refs/heads/master'
run: yarn release