-
Notifications
You must be signed in to change notification settings - Fork 48
76 lines (60 loc) · 1.76 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
name: release-message-nest
on:
push:
# run only against tags
tags:
- '*'
# workflow_dispatch: #
permissions:
contents: write
# packages: write
# issues: write
jobs:
build-and-release-message-nest:
runs-on: ubuntu-latest
env:
NODE_ENV: prod
CUSTOM_PROJ_NAME: Message-Nest
DOCKER_IMAGE_NAME: message-nest
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
- run: git fetch --force --tags
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Docker Login
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWD }}
- uses: actions/setup-go@main
with:
go-version: '>=1.20.2'
cache: true
- name: Install npm dependencies
run: npm i
working-directory: web/
- name: Run npm build
run: export NODE_ENV=prod && npm run build
working-directory: web/
- name: Check build static
run: ls dist/ -la
working-directory: web/
- name: Git File Restore
run: git checkout .
working-directory: web/
# More assembly might be required: Docker logins, GPG, etc. It all depends
# on your needs.
- uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro':
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro'
# distribution:
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}