Skip to content

Commit c9b1adf

Browse files
committed
use environments
1 parent b3f20de commit c9b1adf

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.github/workflows/release-check.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,27 @@ jobs:
5454

5555
- name: Check release
5656
run: |
57-
uv run --script scripts/release.py --dry-run "${{ matrix.directory }}" "${{ needs.prepare.outputs.last_release }}"
57+
uv run --script scripts/release.py --dry-run "${{ matrix.directory }}" "${{ needs.prepare.outputs.last_release }}" | tee -a "$GITHUB_OUTPUT"
58+
59+
check-tag:
60+
needs: [prepare, check-release]
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v4
64+
65+
- name: Simulate tag creation
66+
run: |
67+
if [ -s "$GITHUB_OUTPUT" ]; then
68+
DATE=$(date +%Y.%m.%d)
69+
echo "🔍 Dry run: Would create tag v${DATE} if this was a real release"
70+
71+
echo "# Release ${DATE}" > notes.md
72+
echo "" >> notes.md
73+
echo "## Updated Packages" >> notes.md
74+
while IFS= read -r line; do
75+
echo "- ${line}" >> notes.md
76+
done < "$GITHUB_OUTPUT"
77+
78+
echo "🔍 Would create release with following notes:"
79+
cat notes.md
80+
fi

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
release:
3434
needs: prepare
3535
runs-on: ubuntu-latest
36+
environment: release
3637
strategy:
3738
matrix:
3839
directory: ${{ fromJson(needs.prepare.outputs.matrix) }}

0 commit comments

Comments
 (0)