Skip to content

Commit 4d3014c

Browse files
committed
Small change based on pr stacks-network#91 comments for testing
1 parent dc5cf44 commit 4d3014c

File tree

3 files changed

+27
-18
lines changed

3 files changed

+27
-18
lines changed

stacks-core/release/create-github-release/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Creates a github release for the given tag.
1010
| ------------ | ------------------ | -------- | ------- |
1111
| `tag` | Release Tag | `true` | null |
1212
| `GH_TOKEN` | GitHub Token | `true` | null |
13+
| `release_type` | Release type (one of: stacks-core or stacks-signer) | `true` | null |
1314

1415
## Usage
1516

@@ -27,4 +28,5 @@ jobs:
2728
with:
2829
tag: signer-3.0.0.0.1.0-rc1
2930
GH_TOKEN: ${{ inputs.GH_TOKEN }}
31+
release_type: stacks-signer
3032
```

stacks-core/release/create-github-release/action.yml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,40 @@ inputs:
99
tag:
1010
description: "Release Tag"
1111
required: true
12+
release_type:
13+
description: "Release Type"
14+
required: true
1215
GH_TOKEN:
1316
description: "GitHub Token"
1417
required: true
1518

1619
runs:
1720
using: "composite"
1821
steps:
19-
- name: Check Release Type
20-
id: check_release_type
21-
shell: bash
22-
run: |
23-
# Get the char count of the tag, discarding any `-rc*` at the end of the tag
24-
# - signer releases will have a char count of 6
25-
# - stacks-core releases will have a char count of 5
26-
count=$(echo ${{ inputs.tag}} |tr -d ".|\n" | sed -e 's|-rc[0-9]*$||g' | wc -c)
27-
echo "count: $count"
28-
if [[ "${count}" -gt 5 ]]; then
29-
echo "stacks signer: ${{inputs.tag}}"
30-
echo "release_type=stacks-signer" >> $GITHUB_OUTPUT # if this is a signer release, use the stacks-signer as the release type
31-
else
32-
echo "stacks node: ${{inputs.tag}}"
33-
echo "release_type=stacks-core" >> $GITHUB_OUTPUT # if this is a full release, use the repo name as the release type
34-
fi
22+
# - name: Check Release Type
23+
# id: check_release_type
24+
# shell: bash
25+
# run: |
26+
# # Get the char count of the tag, discarding any `-rc*` at the end of the tag
27+
# # - signer releases will have a char count of 6
28+
# # - stacks-core releases will have a char count of 5
29+
# count=$(echo ${{ inputs.tag}} |tr -d ".|\n" | sed -e 's|-rc[0-9]*$||g' | wc -c)
30+
# echo "count: $count"
31+
# if [[ "${count}" -gt 5 ]]; then
32+
# echo "stacks signer: ${{inputs.tag}}"
33+
# echo "release_type=stacks-signer" >> $GITHUB_OUTPUT # if this is a signer release, use the stacks-signer as the release type
34+
# else
35+
# echo "stacks node: ${{inputs.tag}}"
36+
# echo "release_type=stacks-core" >> $GITHUB_OUTPUT # if this is a full release, use the repo name as the release type
37+
# fi
3538

3639
## Downloads the artifacts built in `create-source-binary`
3740
- name: Download Artifacts
3841
id: download_artifacts
3942
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
4043
with:
41-
pattern: "${{github.sha}}-${{ steps.check_release_type.outputs.release_type }}*" # matches artifact names like 727043a37fbc90f1c7eb391b590bde460ca0e36a-linux-glibc-arm64
44+
# pattern: "${{github.sha}}-${{ steps.check_release_type.outputs.release_type }}*" # matches artifact names like 727043a37fbc90f1c7eb391b590bde460ca0e36a-linux-glibc-arm64
45+
pattern: "${{github.sha}}-${{ inputs.release_type }}*" # matches artifact names like 727043a37fbc90f1c7eb391b590bde460ca0e36a-linux-glibc-arm64
4246
path: release
4347
merge-multiple: true
4448

@@ -47,7 +51,8 @@ runs:
4751
id: generate_checksum
4852
uses: stacks-network/actions/generate-checksum@main
4953
with:
50-
artifact_download_pattern: "${{github.sha}}-${{ steps.check_release_type.outputs.release_type }}*" # matches artifact names like 727043a37fbc90f1c7eb391b590bde460ca0e36a-linux-glibc-arm64
54+
artifact_download_pattern: "${{github.sha}}-${{ inputs.release_type }}*" # matches artifact names like 727043a37fbc90f1c7eb391b590bde460ca0e36a-linux-glibc-arm64
55+
# artifact_download_pattern: "${{github.sha}}-${{ steps.check_release_type.outputs.release_type }}*" # matches artifact names like 727043a37fbc90f1c7eb391b590bde460ca0e36a-linux-glibc-arm64
5156

5257
## Upload the release archives with the checksums file
5358
- name: Upload Release

stacks-core/release/create-releases/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ runs:
2828
with:
2929
tag: ${{ inputs.node_tag }}
3030
GH_TOKEN: ${{ inputs.GH_TOKEN }}
31+
release_type: stacks-core
3132

3233
## Creates the signer release
3334
- name: Create Signer Release
@@ -38,3 +39,4 @@ runs:
3839
with:
3940
tag: ${{ inputs.signer_tag }}
4041
GH_TOKEN: ${{ inputs.GH_TOKEN }}
42+
release_type: stacks-signer

0 commit comments

Comments
 (0)