Generate KSP changelog #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
workflow_call: | |
env: | |
KSP_ROOT: /tmp/ksp | |
RELEASE_STAGING: /tmp/release | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Mod Repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 # get full history, not shallow clone | |
- name: Get Changelog Information | |
uses: drewcassidy/[email protected] | |
id: yaclog-show | |
- uses: KSPModdingLibs/KSPBuildTools/.github/actions/[email protected] | |
- uses: KSPModdingLibs/KSPBuildTools/.github/actions/[email protected] | |
with: | |
ksp-zip-url: https://github.com/KSPModdingLibs/KSPLibs/raw/main/KSP-1.12.5.zip | |
- name: Generate KSP Changelog | |
uses: drewcassidy/[email protected] | |
with: | |
mod-name: Shabby | |
output-path: GameData/shabby-version.cfg | |
- uses: KSPModdingLibs/KSPBuildTools/.github/actions/[email protected] | |
- name: Publish to Github | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
run: > | |
gh release create ${{ github.ref_name }} | |
--notes-file "${{ steps.yaclog-show.outputs.body-file }}" | |
--title "${{ steps.yaclog-show.outputs.name }}" | |
Shabby-*.zip \ | |
Shabby-Release/GameData/Shabby/Shabby.version | |
# We publish both the mod AND the version file, that way there's always a static latest version file to compare against | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |