Skip to content

Commit 187c059

Browse files
authored
Merge pull request #9 from eksrvb/bugfix/update-pipline
Update Release.yaml
2 parents 3d41f08 + 067a7d7 commit 187c059

File tree

1 file changed

+25
-15
lines changed

1 file changed

+25
-15
lines changed

.github/workflows/Release.yaml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,34 @@ name: Publish Release
22

33
on:
44
push:
5-
branches:
6-
- 'main'
5+
branches:
6+
- "main"
77
paths-ignore:
8-
- 'README.md'
8+
- "README.md"
99

1010
jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- name: Checkout code
15-
uses: actions/checkout@v2
16-
- name: Set up Go
17-
uses: actions/setup-go@v2
18-
with:
19-
go-version: 1.15
20-
- name: Build
21-
run: go build -v
22-
- name: Create Release
23-
run: ./awesome-ci createRelease -uploadArtifacts awesome-ci
24-
env:
25-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
- name: Set up Go
17+
uses: actions/setup-go@v2
18+
with:
19+
go-version: 1.15
20+
- name: Set up awesome-ci
21+
run: |
22+
wget https://github.com/eksrvb/awesome-ci/releases/latest/download/awesome-ci
23+
mv awesome-ci awesome-ci-latest
24+
chmod +x awesome-ci-latest
25+
- name: get next Version for project build
26+
id: version_step
27+
run: echo "::set-output name=new_version::$(./awesome-ci-latest getBuildInfos -format version)"
28+
- name: Build
29+
run: go build -v -ldflags "-X main.version=${{ steps.version_step.outputs.new_version }}"
30+
- name: Test writed Version
31+
run: ./awesome-ci -version
32+
- name: Create Release
33+
run: ./awesome-ci createRelease -uploadArtifacts awesome-ci
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)