-
Notifications
You must be signed in to change notification settings - Fork 8
47 lines (47 loc) · 1.44 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
on:
push:
tags:
- "v*"
name: GoReleaser
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch all tags
run: git fetch origin +refs/tags/*:refs/tags/*
- name: Read Go version
id: go_version
run: echo "go_version=$(cat .go-version)" >> $GITHUB_OUTPUT
- name: Install Go (${{ steps.go_version.outputs.go_version }})
uses: actions/setup-go@v4
with:
go-version: ${{ steps.go_version.outputs.go_version }}
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: success()
- name: Send notification to Jenkins
run: |
RELEASE_VERSION="${GITHUB_REF:11}"
curl -Ls -X GET -G \
https://jenkins-ci.archivematica.org/job/am-packbuild/job/rpm-jenkinsci/buildWithParameters \
-d "token=${{ secrets.JENKINS_TOKEN }}" \
-d "PACKAGE=enduro" \
-d "VERSION=${RELEASE_VERSION}" \
-d "RELEASE=1" \
-d "PACKBUILD_BRANCH=dev/enduro-package" \
-d "REPOSITORY=enduro"
if: success()