-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (74 loc) · 1.99 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
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
name: Release & Docker
on:
push:
branches:
- 'main'
tags:
- '*'
jobs:
install:
runs-on: ubuntu-latest
steps:
- name: Use Node.js
uses: actions/setup-node@v4
- run: yarn --frozen-lockfile
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v1
- run: yarn
- run: yarn build
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: build
path: build
release:
runs-on: ubuntu-latest
steps:
- name: Checkout current branch
uses: actions/checkout@v4
- name: Get current version
id: version
uses: notiz-dev/github-action-json-property@release
with:
path: 'package.json'
prop_path: 'version'
- run: echo ${{steps.version.outputs.prop}}
- name: Release snapshot
id: release-snapshot
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{steps.version.outputs.prop}}
release_name: ${{steps.version.outputs.prop}}
draft: false
prerelease: false
docker:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download build
id: download
uses: actions/download-artifact@v4
with:
name: build
path: build
- name: Get current version
id: version
uses: notiz-dev/github-action-json-property@release
with:
path: 'package.json'
prop_path: 'version'
- run: echo ${{steps.version.outputs.prop}}
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: inseefr/moog
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
tags: ${{steps.version.outputs.prop}}