-
Notifications
You must be signed in to change notification settings - Fork 2
79 lines (71 loc) · 2.28 KB
/
release-prod.build-and-publish.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
78
79
name: "Release prod: Build & Publish Artifacts"
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
on:
release:
types: [created]
jobs:
build:
if: startsWith(github.ref, 'refs/tags/0.0.0-dev') != true
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set env
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
# TODO: This should run only if all tests are satisfying
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: "~> v2"
args: release -f .goreleaser.yml --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
FURY_TOKEN: ${{ secrets.FURY_PUSH_TOKEN }}
SHORT_SHA: ${{ env.SHORT_SHA }}
- name: create docs
run: |
mkdir -p commands
go run ./cmd gen doc
- name: Pushes ize commands to ize.sh
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
with:
source_file: 'website/commands'
destination_repo: 'hazelops/ize.sh'
destination_folder: 'content'
user_email: '[email protected]'
user_name: 'ize'
commit_message: 'Add commands from Ize'
create_jira_release:
needs: build
runs-on: ubuntu-latest
steps:
- name: create release
uses: Rorychan/jira-releases-action@v1
continue-on-error: true
with:
jira-server: 'https://hazelops.atlassian.net'
jira-email: '[email protected]'
jira-api-token: ${{ secrets.JIRA_API_TOKEN }}
project-name: 'IZE'
release-name: ${{ github.event.release.name }}
is-released: true
- name: Sleep for 7 minutes
uses: whatnick/wait-action@master
with:
time: '7m'