Skip to content

Commit 54816f5

Browse files
committed
added release dryrun workflow to validate build data for release
1 parent 0006cf5 commit 54816f5

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Create Release and Assets (Dry Run)
2+
on:
3+
push:
4+
# Sequence of patterns matched against refs/tags
5+
branches: ["develop"]
6+
pull_request:
7+
branches: ["develop"]
8+
9+
permissions:
10+
contents: write
11+
packages: write
12+
13+
jobs:
14+
create-github-release-:
15+
name: Create Release
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@master
20+
- name: Read CHANGELOG data
21+
# https://medium.com/@ibraheemabukaff/github-actions-exporting-multi-line-one-line-value-environment-variable-5bb86d01e866
22+
run: |
23+
changelog_text=$(cat "${{ github.workspace }}/CHANGELOG")
24+
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
25+
echo $changelog_text >> $GITHUB_ENV
26+
echo "EOF" >> $GITHUB_ENV
27+
- name: Echo CHANGELOG
28+
run: |
29+
echo "CHANGELOG read from file as:"
30+
echo ${{ env.CHANGELOG }}
31+
32+
releases-matrix:
33+
name: Release Go Binary Dry Run
34+
runs-on: ubuntu-latest
35+
strategy:
36+
matrix:
37+
# build and publish in parallel: "darwin/amd64","freebsd/amd64","freebsd/arm64","freebsd/arm","linux/amd64","linux/arm","linux/arm64","openbsd/amd64","openbsd/arm64","openbsd/arm","windows/amd64"
38+
goos: [linux, windows, darwin, freebsd, openbsd]
39+
goarch: [amd64, arm64, arm]
40+
exclude:
41+
- goarch: arm64
42+
goos: windows
43+
- goarch: arm
44+
goos: windows
45+
- goarch: arm64
46+
goos: darwin
47+
- goarch: arm
48+
goos: darwin
49+
steps:
50+
- uses: actions/checkout@v3
51+
- name: Echo build architectures
52+
run: echo "Dry Run build - ${{ matrix.goos }}/${{ matrix.goarch }}"

0 commit comments

Comments
 (0)