Skip to content

release-please

release-please #94

on:
workflow_run:
workflows: [".Net"]
branches: ["master"]
types:
- completed
permissions:
contents: write
pull-requests: write
name: release-please
env:
MOD_NAME: "techtonica_vr"
PI_UTILS_VERSION: "0.3.0"
TTIK_VERSION: "0.2.2"
TOBEY_UNITY_AUDIO_VERSION: "2.0.2"
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- id: release
uses: google-github-actions/release-please-action@v4
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
config-file: release-please-config.json
- name: Download release artifact
if: ${{ steps.release.outputs.release_created }}
uses: actions/download-artifact@v4
with:
name: release-artifact
path: artifact
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.DEPENDENCY_TOKEN }}
- name: Download Tobey.UnityAudio
if: ${{ steps.release.outputs.release_created }}
uses: dsaltares/fetch-gh-release-asset@1.1.1
with:
repo: "toebeann/Tobey.UnityAudio"
file: "Tobey.UnityAudio.zip"
version: "tags/v${{ env.TOBEY_UNITY_AUDIO_VERSION }}"
token: ${{ secrets.DEPENDENCY_TOKEN }}
- name: Download PiUtils
if: ${{ steps.release.outputs.release_created }}
uses: dsaltares/fetch-gh-release-asset@1.1.1
with:
repo: "xenira/PiUtils"
file: "pi_utils-v${{ env.PI_UTILS_VERSION }}.zip"
version: "tags/v${{ env.PI_UTILS_VERSION }}"
token: ${{ secrets.DEPENDENCY_TOKEN }}
- name: Download TTIK
if: ${{ steps.release.outputs.release_created }}
uses: dsaltares/fetch-gh-release-asset@1.1.1
with:
repo: "xenira/TTIK"
file: "ttik-v${{ env.TTIK_VERSION }}.zip"
version: "tags/v${{ env.TTIK_VERSION }}"
token: ${{ secrets.DEPENDENCY_TOKEN }}
- name: Zip release artifact
if: ${{ steps.release.outputs.release_created }}
run: |
cd artifact && npx downdoc -a env-github -a env-thunderstore README.adoc && zip -r ${{ env.MOD_NAME }}-${{ steps.release.outputs.tag_name }}-thunderstore.zip ./ && cd ..
mv artifact/${{ env.MOD_NAME }}-${{ steps.release.outputs.tag_name }}-thunderstore.zip .
rm artifact/README.md
unzip Tobey.UnityAudio.zip -d ./artifact/
unzip -n pi_utils-v${{ env.PI_UTILS_VERSION }}.zip -d ./artifact/
unzip -n ttik-v${{ env.TTIK_VERSION }}.zip -d ./artifact/
cd artifact && zip -r ${{ env.MOD_NAME }}-${{ steps.release.outputs.tag_name }}.zip ./ && cd ..
mv artifact/${{ env.MOD_NAME }}-${{ steps.release.outputs.tag_name }}.zip .
- name: Upload release artifact
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ steps.release.outputs.tag_name }} ${{ env.MOD_NAME }}-${{ steps.release.outputs.tag_name }}.zip --repo Xenira/TechtonicaVR
- name: Upload to Thunderstore
uses: GreenTF/upload-thunderstore-package@v4.3
if: ${{ steps.release.outputs.release_created }}
with:
namespace: "3_141"
community: techtonica
name: TechtonicaVR
description: VR mod for Techtonica
categories: |
mods
file: ${{ env.MOD_NAME }}-${{ steps.release.outputs.tag_name }}-thunderstore.zip
version: "${{ steps.release.outputs.major }}.${{ steps.release.outputs.major }}.${{ steps.release.outputs.patch }}"
repo: thunderstore.io
token: ${{ secrets.THUNDERSTORE_KEY }}