Skip to content

Commit 95139fb

Browse files
authored
Merge pull request #5681 from stacks-network/revert-5495-develop
Revert "Release Signer Alongside Node"
2 parents 9b5621c + 3afb2b1 commit 95139fb

File tree

4 files changed

+277
-128
lines changed

4 files changed

+277
-128
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -50,30 +50,21 @@ jobs:
5050
with:
5151
alias: "fmt-stacks"
5252

53-
## Check if the head branch of the PR is a release branch
54-
##
55-
## Runs when the following is true:
56-
## - The workflow was triggered by a `workflow_dispatch` action
53+
######################################################################################
54+
## Check if the branch that this workflow is being run against is a release branch
5755
check-release:
58-
if: |
59-
(
60-
github.event_name == 'workflow_dispatch'
61-
)
6256
name: Check Release
6357
needs:
6458
- rustfmt
6559
runs-on: ubuntu-latest
6660
outputs:
67-
node_tag: ${{ steps.check_release.outputs.node_tag }}
68-
node_docker_tag: ${{ steps.check_release.outputs.node_docker_tag }}
69-
signer_tag: ${{ steps.check_release.outputs.signer_tag }}
70-
signer_docker_tag: ${{ steps.check_release.outputs.signer_docker_tag }}
71-
is_node_release: ${{ steps.check_release.outputs.is_node_release }}
72-
is_signer_release: ${{ steps.check_release.outputs.is_signer_release }}
61+
tag: ${{ steps.check_release.outputs.tag }}
62+
docker_tag: ${{ steps.check_release.outputs.docker_tag }}
63+
is_release: ${{ steps.check_release.outputs.is_release }}
7364
steps:
7465
- name: Check Release
7566
id: check_release
76-
uses: stacks-network/actions/stacks-core/release/check-release@main
67+
uses: stacks-network/actions/stacks-core/check-release@main
7768
with:
7869
tag: ${{ github.ref_name }}
7970

@@ -84,20 +75,15 @@ jobs:
8475
## - it is a release run
8576
create-release:
8677
if: |
87-
needs.check-release.outputs.is_node_release == 'true' ||
88-
needs.check-release.outputs.is_signer_release == 'true'
89-
name: Create Release(s)
78+
needs.check-release.outputs.is_release == 'true'
79+
name: Create Release
9080
needs:
9181
- rustfmt
9282
- check-release
9383
uses: ./.github/workflows/github-release.yml
9484
with:
95-
node_tag: ${{ needs.check-release.outputs.node_tag }}
96-
node_docker_tag: ${{ needs.check-release.outputs.node_docker_tag }}
97-
signer_tag: ${{ needs.check-release.outputs.signer_tag }}
98-
signer_docker_tag: ${{ needs.check-release.outputs.signer_docker_tag }}
99-
is_node_release: ${{ needs.check-release.outputs.is_node_release }}
100-
is_signer_release: ${{ needs.check-release.outputs.is_signer_release }}
85+
tag: ${{ needs.check-release.outputs.tag }}
86+
docker_tag: ${{ needs.check-release.outputs.docker_tag }}
10187
secrets: inherit
10288

10389
## Build and push Debian image built from source
@@ -106,7 +92,7 @@ jobs:
10692
## - it is not a release run
10793
docker-image:
10894
if: |
109-
needs.check-release.outputs.is_signer_release != 'true'
95+
needs.check-release.outputs.is_release != 'true'
11096
name: Docker Image (Source)
11197
uses: ./.github/workflows/image-build-source.yml
11298
needs:
@@ -126,7 +112,7 @@ jobs:
126112
## - commit to either (development, master) branch
127113
create-cache:
128114
if: |
129-
needs.check-release.outputs.is_node_release == 'true' || (
115+
needs.check-release.outputs.is_release == 'true' || (
130116
github.event_name == 'workflow_dispatch' ||
131117
github.event_name == 'pull_request' ||
132118
github.event_name == 'merge_group' ||
@@ -158,7 +144,7 @@ jobs:
158144
## - commit to either (development, next, master) branch
159145
stacks-core-tests:
160146
if: |
161-
needs.check-release.outputs.is_signer_release == 'true' || (
147+
needs.check-release.outputs.is_release == 'true' || (
162148
github.event_name == 'workflow_dispatch' ||
163149
github.event_name == 'pull_request' ||
164150
github.event_name == 'merge_group' ||
@@ -212,7 +198,7 @@ jobs:
212198

213199
bitcoin-tests:
214200
if: |
215-
needs.check-release.outputs.is_node_release == 'true' || (
201+
needs.check-release.outputs.is_release == 'true' || (
216202
github.event_name == 'workflow_dispatch' ||
217203
github.event_name == 'pull_request' ||
218204
github.event_name == 'merge_group' ||
@@ -235,7 +221,7 @@ jobs:
235221

236222
p2p-tests:
237223
if: |
238-
needs.check-release.outputs.is_node_release == 'true' || (
224+
needs.check-release.outputs.is_release == 'true' || (
239225
github.event_name == 'workflow_dispatch' ||
240226
github.event_name == 'pull_request' ||
241227
github.event_name == 'merge_group' ||
@@ -260,7 +246,7 @@ jobs:
260246
## Runs when:
261247
## - it is a release run
262248
atlas-tests:
263-
if: needs.check-release.outputs.is_node_release == 'true'
249+
if: needs.check-release.outputs.is_release == 'true'
264250
name: Atlas Tests
265251
needs:
266252
- rustfmt
@@ -269,7 +255,7 @@ jobs:
269255
uses: ./.github/workflows/atlas-tests.yml
270256

271257
epoch-tests:
272-
if: needs.check-release.outputs.is_node_release == 'true'
258+
if: needs.check-release.outputs.is_release == 'true'
273259
name: Epoch Tests
274260
needs:
275261
- rustfmt
@@ -278,7 +264,7 @@ jobs:
278264
uses: ./.github/workflows/epoch-tests.yml
279265

280266
slow-tests:
281-
if: needs.check-release.outputs.is_node_release == 'true'
267+
if: needs.check-release.outputs.is_release == 'true'
282268
name: Slow Tests
283269
needs:
284270
- rustfmt
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
## Github workflow to create multiarch binaries from source
2+
3+
name: Create Binaries
4+
5+
on:
6+
workflow_call:
7+
inputs:
8+
tag:
9+
description: "Tag name of this release (x.y.z)"
10+
required: true
11+
type: string
12+
13+
## change the display name to the tag being built
14+
run-name: ${{ inputs.tag }}
15+
16+
concurrency:
17+
group: create-binary-${{ github.head_ref || github.ref || github.run_id}}
18+
## Only cancel in progress if this is for a PR
19+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
20+
21+
jobs:
22+
## Runs when the following is true:
23+
## - tag is provided
24+
artifact:
25+
if: |
26+
inputs.tag != ''
27+
name: Build Binaries
28+
runs-on: ubuntu-latest
29+
strategy:
30+
## Run a maximum of 10 builds concurrently, using the matrix defined in inputs.arch
31+
max-parallel: 10
32+
matrix:
33+
arch:
34+
- linux-musl
35+
- linux-glibc
36+
- macos
37+
- windows
38+
cpu:
39+
- arm64
40+
- armv7
41+
- x86-64 ## defaults to x86-64-v3 variant - intel haswell (2013) and newer
42+
# - x86-64-v2 ## intel nehalem (2008) and newer
43+
# - x86-64-v3 ## intel haswell (2013) and newer
44+
# - x86-64-v4 ## intel skylake (2017) and newer
45+
exclude:
46+
- arch: windows # excludes windows-arm64
47+
cpu: arm64
48+
- arch: windows # excludes windows-armv7
49+
cpu: armv7
50+
- arch: macos # excludes macos-armv7
51+
cpu: armv7
52+
53+
steps:
54+
- name: Build Binary (${{ matrix.arch }}_${{ matrix.cpu }})
55+
id: build_binary
56+
uses: stacks-network/actions/stacks-core/create-source-binary@main
57+
with:
58+
arch: ${{ matrix.arch }}
59+
cpu: ${{ matrix.cpu }}
60+
tag: ${{ inputs.tag }}

.github/workflows/github-release.yml

Lines changed: 54 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,12 @@ name: Github Release
55
on:
66
workflow_call:
77
inputs:
8-
node_tag:
9-
description: "Node Release Tag"
8+
tag:
9+
description: "Release Tag"
1010
required: true
1111
type: string
12-
node_docker_tag:
13-
description: "Node Docker Release Tag"
14-
required: true
15-
type: string
16-
signer_tag:
17-
description: "Signer Release Tag"
18-
required: true
19-
type: string
20-
signer_docker_tag:
21-
description: "Signer Docker Release Tag"
22-
required: true
23-
type: string
24-
is_node_release:
25-
description: "True if it is a node release"
26-
required: true
27-
type: string
28-
is_signer_release:
29-
description: "True if it is a signer release"
12+
docker_tag:
13+
description: "Docker Release Tag"
3014
required: true
3115
type: string
3216
secrets:
@@ -38,107 +22,81 @@ concurrency:
3822
## Always cancel duplicate jobs
3923
cancel-in-progress: true
4024

41-
run-name: ${{ inputs.node_tag || inputs.signer_tag }}
25+
run-name: ${{ inputs.tag }}
4226

4327
jobs:
4428
## Build arch dependent binaries from source
4529
##
4630
## Runs when the following is true:
47-
## - either node or signer tag is provided
31+
## - tag is provided
4832
build-binaries:
4933
if: |
50-
inputs.node_tag != '' ||
51-
inputs.signer_tag != ''
34+
inputs.tag != ''
5235
name: Build Binaries
53-
runs-on: ubuntu-latest
54-
strategy:
55-
## Run a maximum of 10 builds concurrently, using the matrix defined in inputs.arch
56-
max-parallel: 10
57-
matrix:
58-
arch:
59-
- linux-musl
60-
- linux-glibc
61-
- macos
62-
- windows
63-
cpu:
64-
- arm64
65-
- armv7
66-
- x86-64 ## defaults to x86-64-v3 variant - intel haswell (2013) and newer
67-
# - x86-64-v2 ## intel nehalem (2008) and newer
68-
# - x86-64-v3 ## intel haswell (2013) and newer
69-
# - x86-64-v4 ## intel skylake (2017) and newer
70-
exclude:
71-
- arch: windows # excludes windows-arm64
72-
cpu: arm64
73-
- arch: windows # excludes windows-armv7
74-
cpu: armv7
75-
- arch: macos # excludes macos-armv7
76-
cpu: armv7
77-
steps:
78-
- name: Build Binary (${{ matrix.arch }}_${{ matrix.cpu }})
79-
uses: stacks-network/actions/stacks-core/release/create-source-binary@main
80-
with:
81-
arch: ${{ matrix.arch }}
82-
cpu: ${{ matrix.cpu }}
83-
node_tag: ${{ inputs.node_tag }}
84-
signer_tag: ${{ inputs.signer_tag }}
85-
signer_docker_tag: ${{ inputs.signer_docker_tag }}
86-
is_node_release: ${{ inputs.is_node_release }}
36+
uses: ./.github/workflows/create-source-binary.yml
37+
with:
38+
tag: ${{ inputs.tag }}
39+
secrets: inherit
8740

8841
## Runs when the following is true:
89-
## - either node or signer tag is provided
42+
## - tag is provided
43+
## - workflow is building default branch (master)
9044
create-release:
9145
if: |
92-
inputs.node_tag != '' ||
93-
inputs.signer_tag != ''
46+
inputs.tag != ''
9447
name: Create Release
9548
runs-on: ubuntu-latest
9649
needs:
9750
- build-binaries
9851
steps:
99-
## Creates releases
100-
- name: Create Release
101-
uses: stacks-network/actions/stacks-core/release/create-github-releases@main
52+
## Downloads the artifacts built in `create-source-binary.yml`
53+
- name: Download Artifacts
54+
id: download_artifacts
55+
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
10256
with:
103-
node_tag: ${{ inputs.node_tag }}
104-
node_docker_tag: ${{ inputs.node_docker_tag }}
105-
signer_tag: ${{ inputs.signer_tag }}
106-
signer_docker_tag: ${{ inputs.signer_docker_tag }}
107-
is_node_release: ${{ inputs.is_node_release }}
108-
is_signer_release: ${{ inputs.is_signer_release }}
109-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
57+
pattern: ${{ inputs.tag }}-binary-build-*
58+
path: release
59+
merge-multiple: true
60+
61+
## Generate a checksums file to be added to the release page
62+
- name: Generate Checksums
63+
id: generate_checksum
64+
uses: stacks-network/actions/generate-checksum@main
65+
with:
66+
artifact_download_pattern: "${{ inputs.tag }}-binary-build-*"
67+
68+
## Upload the release archives with the checksums file
69+
- name: Upload Release
70+
id: upload_release
71+
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 #v2.0.5
72+
env:
73+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
74+
with:
75+
name: Release ${{ inputs.tag || github.ref }}
76+
tag_name: ${{ inputs.tag || github.ref }}
77+
draft: false
78+
prerelease: true
79+
fail_on_unmatched_files: true
80+
target_commitish: ${{ github.sha }}
81+
generate_release_notes: true
82+
files: |
83+
release/*.zip
84+
CHECKSUMS.txt
11085
11186
## Builds arch dependent Docker images from binaries
11287
##
11388
## Runs when the following is true:
114-
## - either node or signer tag is provided
89+
## - tag is provided
90+
## - workflow is building default branch (master)
11591
docker-image:
11692
if: |
117-
inputs.node_tag != '' ||
118-
inputs.signer_tag != ''
93+
inputs.tag != ''
11994
name: Docker Image (Binary)
120-
runs-on: ubuntu-latest
95+
uses: ./.github/workflows/image-build-binary.yml
12196
needs:
12297
- build-binaries
12398
- create-release
124-
strategy:
125-
fail-fast: false
126-
## Build a maximum of 2 images concurrently based on matrix.dist
127-
max-parallel: 2
128-
matrix:
129-
dist:
130-
- alpine
131-
- debian
132-
steps:
133-
- name: Create Docker Image
134-
uses: stacks-network/actions/stacks-core/release/create-docker-images@main
135-
with:
136-
node_tag: ${{ inputs.node_tag }}
137-
node_docker_tag: ${{ inputs.node_docker_tag }}
138-
signer_tag: ${{ inputs.signer_tag }}
139-
signer_docker_tag: ${{ inputs.signer_docker_tag }}
140-
is_node_release: ${{ inputs.is_node_release }}
141-
is_signer_release: ${{ inputs.is_signer_release }}
142-
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
143-
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
144-
dist: ${{ matrix.dist }}
99+
with:
100+
tag: ${{ inputs.tag }}
101+
docker_tag: ${{ inputs.docker_tag }}
102+
secrets: inherit

0 commit comments

Comments
 (0)