Skip to content

Commit 696a21e

Browse files
Merge pull request #6 from thebongy/develop
Seperate staging and master release jobs
2 parents c868c50 + 1050568 commit 696a21e

File tree

1 file changed

+50
-20
lines changed

1 file changed

+50
-20
lines changed

.github/workflows/build.yml

Lines changed: 50 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -50,29 +50,20 @@ jobs:
5050
name: juno-${{matrix.os}}
5151
path: target/release/juno.exe
5252

53-
release: # Publish release on push to master
54-
if: (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/staging')
53+
release-master: # Publish release on push to master
54+
if: github.ref == 'refs/heads/master'
5555
runs-on: ubuntu-latest
5656
needs: build
5757
steps:
5858
- uses: actions/checkout@v2
5959
- run: git fetch --all --tags
6060

61-
- name: Check Release Version (staging)
62-
if: github.ref == 'refs/heads/staging'
63-
uses: thebongy/version-check@v1
64-
with:
65-
file: Cargo.toml
66-
tagFormat: v${version}-beta
67-
id: version_check_staging
68-
69-
- name: Check Release Version (master)
70-
if: github.ref == 'refs/heads/master'
61+
- name: Check Release Version
7162
uses: thebongy/version-check@v1
7263
with:
7364
file: Cargo.toml
7465
tagFormat: v${version}
75-
id: version_check_master
66+
id: version_check
7667

7768
- name: Download Windows Artifact
7869
uses: actions/download-artifact@v1
@@ -98,22 +89,61 @@ jobs:
9889
mv release/macos/juno release/macos/juno-${{steps.version_check.outputs.releaseVersion}}-macos
9990
mv release/linux/juno release/linux/juno-${{steps.version_check.outputs.releaseVersion}}-linux
10091
101-
- name: Publish Release (master)
102-
if: github.ref == 'refs/heads/master'
92+
- name: Publish Release
10393
uses: softprops/action-gh-release@v1
10494
with:
10595
files: release/**/*
106-
tag_name: ${{steps.version_check_master.outputs.releaseVersion}}
96+
tag_name: ${{steps.version_check.outputs.releaseVersion}}
10797
prerelease: false
10898
env:
10999
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
110100

111-
- name: Publish Release (staging)
112-
if: github.ref == 'refs/heads/staging'
101+
102+
release-staging:
103+
if: github.ref == 'refs/heads/staging'
104+
runs-on: ubuntu-latest
105+
needs: build
106+
steps:
107+
- uses: actions/checkout@v2
108+
- run: git fetch --all --tags
109+
110+
- name: Check Release Version
111+
uses: thebongy/version-check@v1
112+
with:
113+
file: Cargo.toml
114+
tagFormat: v${version}-beta
115+
id: version_check
116+
117+
- name: Download Windows Artifact
118+
uses: actions/download-artifact@v1
119+
with:
120+
name: juno-windows-latest
121+
path: release/windows
122+
123+
- name: Download MacOS Artifact
124+
uses: actions/download-artifact@v1
125+
with:
126+
name: juno-macos-latest
127+
path: release/macos
128+
129+
- name: Download Linux Artifact
130+
uses: actions/download-artifact@v1
131+
with:
132+
name: juno-ubuntu-latest
133+
path: release/linux
134+
135+
- name: Rename Artifacts
136+
run: |
137+
mv release/windows/juno.exe release/windows/juno-${{steps.version_check.outputs.releaseVersion}}-windows.exe
138+
mv release/macos/juno release/macos/juno-${{steps.version_check.outputs.releaseVersion}}-macos
139+
mv release/linux/juno release/linux/juno-${{steps.version_check.outputs.releaseVersion}}-linux
140+
141+
- name: Publish Release
113142
uses: softprops/action-gh-release@v1
114143
with:
115144
files: release/**/*
116-
tag_name: ${{steps.version_check_staging.outputs.releaseVersion}}
145+
tag_name: ${{steps.version_check.outputs.releaseVersion}}
117146
prerelease: true
118147
env:
119-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
148+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
149+

0 commit comments

Comments
 (0)