1111jobs :
1212 verify-and-release :
1313 runs-on : ubuntu-latest
14+ permissions :
15+ contents : write
1416 steps :
1517 - name : Checkout code
16- uses : actions/checkout@v4
18+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1719 with :
1820 fetch-depth : 0
1921 fetch-tags : true
22+ persist-credentials : false
2023
2124 - name : Validate tag format
2225 run : |
23- TAG="${{ github.event.inputs.tag } }"
26+ TAG="${GITHUB_EVENT_INPUTS_TAG }"
2427 if [[ ! $TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
2528 echo "❌ Invalid tag format. Expected format: v1.2.3"
2629 exit 1
2730 fi
2831 echo "✅ Tag format is valid: $TAG"
32+ env :
33+ GITHUB_EVENT_INPUTS_TAG : ${{ github.event.inputs.tag }}
2934
3035 - name : Verify tag exists
3136 run : |
32- TAG="${{ github.event.inputs.tag } }"
37+ TAG="${GITHUB_EVENT_INPUTS_TAG }"
3338 if ! git rev-parse --verify "refs/tags/$TAG" >/dev/null 2>&1; then
3439 echo "❌ Tag '$TAG' does not exist in the repository"
3540 echo "Available tags:"
3641 git tag --sort=-version:refname | head -10
3742 exit 1
3843 fi
3944 echo "✅ Tag '$TAG' exists"
45+ env :
46+ GITHUB_EVENT_INPUTS_TAG : ${{ github.event.inputs.tag }}
4047
4148 - name : Checkout specific tag
4249 run : |
43- git checkout ${{ github.event.inputs.tag }}
50+ git checkout ${GITHUB_EVENT_INPUTS_TAG}
51+ env :
52+ GITHUB_EVENT_INPUTS_TAG : ${{ github.event.inputs.tag }}
4453
4554 - name : Verify GPG signature on tag
4655 run : |
47- TAG="${{ github.event.inputs.tag } }"
56+ TAG="${GITHUB_EVENT_INPUTS_TAG }"
4857
4958 # Force fetch the complete tag object (not just commit reference)
5059 echo "=== Fetching Tag Object ==="
@@ -72,49 +81,61 @@ jobs:
7281
7382 # Cleanup
7483 rm /tmp/pubkey.asc
84+ env :
85+ GITHUB_EVENT_INPUTS_TAG : ${{ github.event.inputs.tag }}
7586
7687 - name : Get version from tag
7788 id : get_version
7889 run : |
79- TAG="${{ github.event.inputs.tag } }"
90+ TAG="${GITHUB_EVENT_INPUTS_TAG }"
8091 VERSION=${TAG#v}
8192 echo "version=$VERSION" >> $GITHUB_OUTPUT
8293 echo "tag=$TAG" >> $GITHUB_OUTPUT
94+ env :
95+ GITHUB_EVENT_INPUTS_TAG : ${{ github.event.inputs.tag }}
8396
8497 - name : Package repository
8598 run : |
8699 mkdir -p dist
87100
88101 # Create source package
89- zip -r dist/fractum-${{ steps.get_version.outputs.version } }-source.zip \
102+ zip -r dist/fractum-${STEPS_GET_VERSION_OUTPUTS_VERSION }-source.zip \
90103 src/ \
91104 packages/ \
105+ tests/ \
92106 bootstrap-*.sh \
93107 bootstrap-*.ps1 \
94108 Dockerfile \
109+ .dockerignore \
110+ assets \
95111 setup.py \
96112 README.md \
97113 LICENSE \
98114 --exclude="*.pyc" \
99115 --exclude="__pycache__/*" \
116+ --exclude="*.DS_Store" \
100117 --exclude=".git/*"
101118
102119 # Create checksums
103120 cd dist
104- sha256sum fractum-${{ steps.get_version.outputs.version }}-source.zip > checksums.txt
121+ sha256sum fractum-${STEPS_GET_VERSION_OUTPUTS_VERSION}-source.zip > checksums.txt
122+ env :
123+ STEPS_GET_VERSION_OUTPUTS_VERSION : ${{ steps.get_version.outputs.version }}
105124
106125 - name : Extract release notes from tag
107126 id : release_notes
108127 run : |
109- TAG="${{ github.event.inputs.tag } }"
128+ TAG="${GITHUB_EVENT_INPUTS_TAG }"
110129 # Extract release notes from signed tag message
111130 NOTES=$(git tag -l --format='%(contents)' $TAG)
112131 echo "notes<<EOF" >> $GITHUB_OUTPUT
113132 echo "$NOTES" >> $GITHUB_OUTPUT
114133 echo "EOF" >> $GITHUB_OUTPUT
134+ env :
135+ GITHUB_EVENT_INPUTS_TAG : ${{ github.event.inputs.tag }}
115136
116137 - name : Create GitHub Release
117- uses : softprops/action-gh-release@v2.2.2
138+ uses : softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v2.2.2
118139 with :
119140 tag_name : ${{ steps.get_version.outputs.tag }}
120141 name : Fractum ${{ steps.get_version.outputs.tag }}
@@ -155,6 +176,9 @@ jobs:
155176
156177 - name : Update website release info
157178 run : |
158- echo "🚀 Released Fractum ${{ steps.get_version.outputs.version }}"
159- echo "Tag: ${{ steps.get_version.outputs.tag }}"
160- echo "Signature verified: ✅"
179+ echo "🚀 Released Fractum ${STEPS_GET_VERSION_OUTPUTS_VERSION}"
180+ echo "Tag: ${STEPS_GET_VERSION_OUTPUTS_TAG}"
181+ echo "Signature verified: ✅"
182+ env :
183+ STEPS_GET_VERSION_OUTPUTS_VERSION : ${{ steps.get_version.outputs.version }}
184+ STEPS_GET_VERSION_OUTPUTS_TAG : ${{ steps.get_version.outputs.tag }}
0 commit comments