Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions .github/workflows/gitversion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,7 @@ jobs:
with:
fetch-depth: 0
persist-credentials: false
- name: Install GitVersion
run: dotnet tool install GitVersion.Tool --tool-path "$RUNNER_TEMP/gitversion" --version 6.8.2
- name: Calculate and validate version
shell: bash
run: |
set -euo pipefail
version="$("$RUNNER_TEMP/gitversion/dotnet-gitversion" /showvariable SemVer)"
test -n "$version"
echo "Calculated GitVersion SemVer: $version"
echo "### GitVersion: $version" >> "$GITHUB_STEP_SUMMARY"
- name: Calculate and validate version (shared platform)
uses: 4FusionLab/.github/.github/actions/resolve-version@ad9d60ba4aabc494b4f2c85d6c566a50ca423751
with:
variable: SemVer
55 changes: 37 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ jobs:
with:
fetch-depth: 0
persist-credentials: false
- run: python scripts/release_changes.py --self-test
- name: Detect addon changes
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
- name: Detect runtime changes (shared platform)
id: impact
env:
BEFORE: ${{ github.event.before }}
run: python scripts/release_changes.py --before "$BEFORE" --after "$GITHUB_SHA" --github-output "$GITHUB_OUTPUT"
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: 4FusionLab/.github/.github/actions/runtime-changes@ad9d60ba4aabc494b4f2c85d6c566a50ca423751
with:
before: ${{ github.event.before }}
after: ${{ github.sha }}
paths-file: .github/release-paths.txt

test:
needs: changes
outputs:
Expand All @@ -44,30 +46,31 @@ jobs:
- uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Derive package version from GitVersion
- name: Resolve GitVersion (shared platform)
id: version
shell: bash
run: |
set -euo pipefail
dotnet tool install GitVersion.Tool --tool-path "$RUNNER_TEMP/gitversion" --version 6.8.2
version="$("$RUNNER_TEMP/gitversion/dotnet-gitversion" /showvariable MajorMinorPatch)"
[[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]
echo "version=$version" >> "$GITHUB_OUTPUT"
uses: 4FusionLab/.github/.github/actions/resolve-version@ad9d60ba4aabc494b4f2c85d6c566a50ca423751

- name: Check Python and package all platform ZIPs
shell: bash
run: |
set -euo pipefail
python -m unittest discover -s tests -v
python scripts/package.py --version "${{ steps.version.outputs.version }}"
- name: Generate release notes for validation (shared platform)
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changes.outputs.release == 'true'
uses: 4FusionLab/.github/.github/actions/release-notes@ad9d60ba4aabc494b4f2c85d6c566a50ca423751
with:
product: RuEn
version: ${{ steps.version.outputs.version }}
candidate: docs/releases/${{ steps.version.outputs.version }}.md
output: ${{ runner.temp }}/release-notes.md
- name: Validate release candidate when runtime changed
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changes.outputs.release == 'true'
shell: bash
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
set -euo pipefail
python scripts/release_notes.py --product RuEn --version "$VERSION" \
--output "$RUNNER_TEMP/release-notes.md" --candidate "docs/releases/$VERSION.md"
python scripts/release_contract.py --version "$VERSION" --tag "v$VERSION" \
--channel stable --manifest RuEn/RuEn.manifest \
--archive "dist/RuEn-$VERSION-universal.zip" \
Expand Down Expand Up @@ -101,6 +104,24 @@ jobs:
with:
name: RuEn-distributions
path: dist
- name: Generate release notes for publication (shared platform)
uses: 4FusionLab/.github/.github/actions/release-notes@ad9d60ba4aabc494b4f2c85d6c566a50ca423751
with:
product: RuEn
version: ${{ needs.test.outputs.version }}
candidate: docs/releases/${{ needs.test.outputs.version }}.md
output: ${{ runner.temp }}/release-notes.md
- name: Verify platform ZIPs (shared platform)
uses: 4FusionLab/.github/.github/actions/verify-archive@ad9d60ba4aabc494b4f2c85d6c566a50ca423751
with:
product: RuEn
version: ${{ needs.test.outputs.version }}
archives: |
dist/RuEn-${{ needs.test.outputs.version }}-universal.zip
dist/RuEn-${{ needs.test.outputs.version }}-macos.zip
dist/RuEn-${{ needs.test.outputs.version }}-windows.zip
manifest: RuEn/RuEn.manifest
notes: ${{ runner.temp }}/release-notes.md
- name: Verify packages and publish immutable release
shell: bash
env:
Expand All @@ -109,8 +130,6 @@ jobs:
run: |
set -euo pipefail
tag="v$VERSION"
python scripts/release_notes.py --product RuEn --version "$VERSION" \
--output "$RUNNER_TEMP/release-notes.md" --candidate "docs/releases/$VERSION.md"
python scripts/release_contract.py --version "$VERSION" --tag "$tag" \
--channel stable --manifest RuEn/RuEn.manifest \
--archive "dist/RuEn-$VERSION-universal.zip" \
Expand Down
Loading