Skip to content

0.6.0

0.6.0 #285

Workflow file for this run

name: Release Build
on:
push:
branches: [master]
paths-ignore:
- "*.md"
- "LICENSE"
- ".gitignore"
- ".github/**"
pull_request:
branches: [master]
types:
- synchronize
- labeled
paths-ignore:
- "*.md"
- "LICENSE"
- ".gitignore"
jobs:
Build:
if: ${{ github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'update-pr') }}
uses: ./.github/workflows/build.yml
with:
build_type: Release
Update_Release:
name: 'Create/Update Release Asset'
needs: Build
outputs:
version: ${{ steps.version.outputs.prop }}
if: ${{ github.ref != 'refs/heads/master' && contains(github.event.pull_request.labels.*.name, 'update-pr') }}
runs-on: ubuntu-latest
steps:
- name: Download Winch Asset
uses: actions/download-artifact@v4
with:
name: Winch
path: Winch
- name: Zip Winch Asset
run: |
cd Winch/
zip -r Winch.zip *
mv Winch.zip ..
cd ..
- name: Download Example Mods
uses: actions/download-artifact@v4
with:
name: Winch Examples
path: Examples
- name: Zip Example Mods
run: |
for mod in DisasterButton ExampleItems IntroSkipper
do
cd Examples/$mod/
zip -r $mod.zip *
mv $mod.zip ../..
cd ../..
done
- name: Upload Asset
uses: ncipollo/release-action@v1
with:
allowUpdates: true
commit: master
tag: v${{ github.event.pull_request.title }}
name: Version ${{ github.event.pull_request.title }}
omitBodyDuringUpdate: true
artifacts: Winch.zip, DisasterButton.zip, ExampleItems.zip, IntroSkipper.zip
draft: true
prerelease: false
Pack_Nuget:
name: Pack nuget
needs: Update_Release
runs-on: windows-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get version
id: version
uses: notiz-dev/github-action-json-property@release
with:
path: Winch/mod_meta.json
prop_path: Version
- name: Set up nuget
uses: NuGet/[email protected]
- name: Download Winch Asset
uses: actions/download-artifact@v4
with:
name: Winch
path: Winch/bin
- name: Pack nuget
run: nuget pack Winch/Winch.nuspec -Properties "version=${{ steps.version.outputs.prop }}"
- run: dir
- name: Publish nuget
run: nuget push "Winch.*.nupkg" -ApiKey ${{ secrets.NUGET_KEY }} -Source https://api.nuget.org/v3/index.json