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
20 changes: 20 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,8 @@ jobs:
startsWith(github.ref, 'refs/tags/v') ||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
runs-on: windows-2025
outputs:
release_tag: ${{ steps.combined_notes.outputs.release_tag }}
permissions:
contents: write
steps:
Expand Down Expand Up @@ -597,6 +599,7 @@ jobs:
echo "release_tag=$RELEASE_TAG" >> $GITHUB_OUTPUT

- name: Create or Update Release
id: create_release
uses: ncipollo/release-action@v1
with:
name: "Community Shaders ${{ steps.combined_notes.outputs.release_tag }}"
Expand All @@ -608,3 +611,20 @@ jobs:
replacesArtifacts: true
removeArtifacts: true
allowUpdates: true

nexus-upload:
name: Nexus Upload (dry run)
needs: release
if: >
always() &&
needs.release.result == 'success' &&
startsWith(github.ref, 'refs/tags/v') &&
!contains(github.ref_name, '-')
uses: ./.github/workflows/upload-nexus.yaml
with:
tag: ${{ needs.release.outputs.release_tag }}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
artifact_pattern: "CommunityShaders-*.7z"
dry_run: "true"
secrets:
UNEX_NEXUSMODS_SESSION_COOKIE: ${{ secrets.UNEX_NEXUSMODS_SESSION_COOKIE }}
UNEX_APIKEY: ${{ secrets.UNEX_APIKEY }}
38 changes: 0 additions & 38 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,13 @@ on:
description: "Release type: rc or stable"
required: true
default: "rc"
dry_run:
description: "Dry-run for downstream Nexus upload (true uploads nothing)"
required: false
default: "true"

permissions:
contents: write
actions: write

jobs:
release:
runs-on: ubuntu-latest
outputs:
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
new_release_version: ${{ steps.semantic.outputs.new_release_version }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
Expand All @@ -32,7 +24,6 @@ jobs:
run: |
python tools/feature_version_audit.py \
--apply-bumps \
--ci \
--output /tmp/feature-version-audit.txt

- name: Semantic Release
Expand All @@ -46,32 +37,3 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TYPE: ${{ github.event.inputs.release_type }}

dispatch-upload:
name: Trigger Nexus upload workflow
runs-on: ubuntu-latest
needs: release
if: needs.release.outputs.new_release_published == 'true'
steps:
- name: Dispatch upload-nexus.yaml
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
RELEASE_TAG: v${{ needs.release.outputs.new_release_version }}
DRY_RUN: ${{ github.event.inputs.dry_run || 'true' }}
run: |
gh workflow run upload-nexus.yaml \
--repo "$REPO" \
--ref "${GITHUB_REF_NAME}" \
-f tag="$RELEASE_TAG" \
-f dry_run="$DRY_RUN"

- name: Create job summary
env:
RELEASE_TAG: v${{ needs.release.outputs.new_release_version }}
DRY_RUN: ${{ github.event.inputs.dry_run || 'true' }}
run: |
echo "## Release Complete - Nexus Upload Dispatched" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "✓ Release **$RELEASE_TAG** created successfully" >> $GITHUB_STEP_SUMMARY
echo "✓ Dispatched [upload-nexus.yaml](https://github.com/${{ github.repository }}/actions/workflows/upload-nexus.yaml) with tag \`$RELEASE_TAG\` (dry_run=\`$DRY_RUN\`)" >> $GITHUB_STEP_SUMMARY
53 changes: 46 additions & 7 deletions .github/workflows/upload-nexus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,41 @@ on:
changelog:
description: "Optional release notes or changelog for Nexus"
required: false
workflow_call:
inputs:
tag:
description: "Release tag to upload to Nexus"
required: true
type: string
nexus_game_id:
required: false
type: string
default: "skyrimspecialedition"
nexus_mod_id:
required: false
type: string
default: "86492"
artifact_pattern:
required: false
type: string
default: "CommunityShaders-*.7z"
Comment thread
alandtse marked this conversation as resolved.
mod_filename:
required: false
type: string
default: "Community Shaders"
dry_run:
required: false
type: string
default: "true"
changelog:
required: false
type: string
default: ""
secrets:
UNEX_NEXUSMODS_SESSION_COOKIE:
required: false
UNEX_APIKEY:
required: false

jobs:
prepare-nexus-matrix:
Expand Down Expand Up @@ -59,11 +94,15 @@ jobs:
echo 'No tag provided for Nexus upload' >&2
exit 1
fi
if [[ "$TAG" == *-* ]]; then
echo "ERROR: '$TAG' is a pre-release tag. Only stable releases are uploaded to Nexus." >&2
exit 1
fi
VERSION="${TAG#v}"
echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "version=$VERSION" >> $GITHUB_OUTPUT
env:
INPUT_TAG: ${{ github.event.inputs.tag || '' }}
INPUT_TAG: ${{ inputs.tag || '' }}

- name: Compute dry-run mode
id: dryrun
Expand All @@ -74,7 +113,7 @@ jobs:
echo "dry_run=true" >> $GITHUB_OUTPUT
fi
env:
INPUT_DRY_RUN: ${{ github.event.inputs.dry_run || '' }}
INPUT_DRY_RUN: ${{ inputs.dry_run || '' }}

- name: Generate Nexus upload matrix
id: generate
Expand Down Expand Up @@ -120,9 +159,9 @@ jobs:
echo "has_uploads=$(python -c \"import json; print('true' if json.load(open('nexus-upload-state.json')).get('has_uploads') else 'false')\")" >> $GITHUB_OUTPUT
env:
RELEASE_TAG: ${{ steps.resolve.outputs.tag }}
INPUT_NEXUS_MOD_ID: ${{ github.event.inputs.nexus_mod_id || '' }}
INPUT_MOD_FILENAME: ${{ github.event.inputs.mod_filename || '' }}
INPUT_ARTIFACT_PATTERN: ${{ github.event.inputs.artifact_pattern || '' }}
INPUT_NEXUS_MOD_ID: ${{ inputs.nexus_mod_id || '' }}
INPUT_MOD_FILENAME: ${{ inputs.mod_filename || '' }}
INPUT_ARTIFACT_PATTERN: ${{ inputs.artifact_pattern || '' }}

prepare-artifacts:
needs: prepare-nexus-matrix
Expand Down Expand Up @@ -200,13 +239,13 @@ jobs:
continue-on-error: ${{ matrix.name != 'core' }}
uses: alandtse/nexus-workflows/.github/workflows/upload-nexus.yml@main
with:
nexus_game_id: ${{ github.event.inputs.nexus_game_id || 'skyrimspecialedition' }}
nexus_game_id: ${{ inputs.nexus_game_id || 'skyrimspecialedition' }}
nexus_mod_id: ${{ matrix.nexus_mod_id }}
artifact_name: nexus-upload-${{ matrix.name }}
tag_name: ${{ needs.prepare-nexus-matrix.outputs.tag }}
mod_version: ${{ matrix.mod_version || needs.prepare-nexus-matrix.outputs.version }}
mod_filename: ${{ matrix.mod_filename }}
changelog: ${{ github.event.inputs.changelog || '' }}
changelog: ${{ inputs.changelog || '' }}
secrets:
UNEX_NEXUSMODS_SESSION_COOKIE: ${{ secrets.UNEX_NEXUSMODS_SESSION_COOKIE }}
UNEX_APIKEY: ${{ secrets.UNEX_APIKEY }}
Expand Down
Loading