Skip to content

Commit

Permalink
ci: auto release / upload
Browse files Browse the repository at this point in the history
  • Loading branch information
alterNERDtive committed Feb 14, 2024
1 parent 25b1c58 commit a5a186c
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Create release on tag push

on:
push:
tags:
- '*'

jobs:
build:
name: Create release
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Zip up the files
run: zip -r bg3-mod-profiles-for-linux.zip util bg3overlay bg3switch LICENSE README.md

- name: Draft release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.RELEASE_TOKEN }}
artifacts: "bg3-mod-profiles-for-linux.zip"
bodyFile: "CHANGELOG.md"
draft: true
33 changes: 33 additions & 0 deletions .github/workflows/publish-to-nexusmods.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish to Nexusmods on release

on:
release:
types: [published]

jobs:
build:
name: Publish to Nexusmods
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Download release artifacts
env:
GH_TOKEN: ${{ github.token }}
run: gh release download ${{ github.ref_name }}

- name: Publish to Nexusmods
uses: hmlendea/nexusmods-update@latest
with:
account_email_address: ${{secrets.NEXUS_UPLOADER_EMAIL_ADDRESS}}
account_password: ${{secrets.NEXUS_UPLOADER_PASSWORD}}
nexus_game_id: "baldursgate3"
nexus_mod_id: "3458"
mod_file_name: "bg3-mod-profiles"
mod_version: ${{github.ref_name}}
file_description: "Changelog: https://git.alternerd.tv/alterNERDtive/bg3-mod-profiles/releases/${{github.ref_name}}"
file_path: "bg3-mod-profiles.zip"

0 comments on commit a5a186c

Please sign in to comment.