Skip to content

Commit

Permalink
use environments
Browse files Browse the repository at this point in the history
  • Loading branch information
dsp-ant committed Jan 13, 2025
1 parent b3f20de commit c9b1adf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/release-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,27 @@ jobs:

- name: Check release
run: |
uv run --script scripts/release.py --dry-run "${{ matrix.directory }}" "${{ needs.prepare.outputs.last_release }}"
uv run --script scripts/release.py --dry-run "${{ matrix.directory }}" "${{ needs.prepare.outputs.last_release }}" | tee -a "$GITHUB_OUTPUT"
check-tag:
needs: [prepare, check-release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Simulate tag creation
run: |
if [ -s "$GITHUB_OUTPUT" ]; then
DATE=$(date +%Y.%m.%d)
echo "🔍 Dry run: Would create tag v${DATE} if this was a real release"
echo "# Release ${DATE}" > notes.md
echo "" >> notes.md
echo "## Updated Packages" >> notes.md
while IFS= read -r line; do
echo "- ${line}" >> notes.md
done < "$GITHUB_OUTPUT"
echo "🔍 Would create release with following notes:"
cat notes.md
fi
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
release:
needs: prepare
runs-on: ubuntu-latest
environment: release
strategy:
matrix:
directory: ${{ fromJson(needs.prepare.outputs.matrix) }}
Expand Down

0 comments on commit c9b1adf

Please sign in to comment.