From ff262d55c861b531ee643203f781004d6d87a7b9 Mon Sep 17 00:00:00 2001 From: Andrew Cassidy Date: Fri, 11 Mar 2022 22:28:15 -0800 Subject: [PATCH] Automatically fast-forward the release branch on release --- .github/workflows/ff-release.yml | 22 +++++++++++++++++++++ .github/workflows/ksp-publish.yml | 33 +++++++++++++++---------------- 2 files changed, 38 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/ff-release.yml diff --git a/.github/workflows/ff-release.yml b/.github/workflows/ff-release.yml new file mode 100644 index 0000000..3d6aadb --- /dev/null +++ b/.github/workflows/ff-release.yml @@ -0,0 +1,22 @@ +name: Fast-Forward Release Branch +on: [ release ] + +jobs: + fast-forward: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + ref: release + fetch-depth: 0 + + - name: Merge into Release + run: | + git merge ${{github.ref_name}} --ff-only + + - name: Push Changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: release \ No newline at end of file diff --git a/.github/workflows/ksp-publish.yml b/.github/workflows/ksp-publish.yml index 27adc3b..8d7ce03 100644 --- a/.github/workflows/ksp-publish.yml +++ b/.github/workflows/ksp-publish.yml @@ -1,5 +1,4 @@ - -name: build +name: Build and Release on: [ push ] jobs: @@ -9,16 +8,16 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Setup Python + - name: Setup Python uses: actions/setup-python@v2 with: python-version: '3.x' - + - name: Setup .NET Core SDK uses: actions/setup-dotnet@v1.7.2 with: dotnet-version: '6.0.x' - + - name: Install Python Tools run: | python -m pip install --upgrade pip @@ -29,7 +28,7 @@ jobs: echo "VERSION_TITLE=$(yaclog show -n)" >> $GITHUB_ENV python Scripts/version.py yaclog-ksp -n "Conformal Decals" - + - name: Validate Version Info uses: DasSkelett/AVC-VersionFileValidator@master @@ -39,13 +38,13 @@ jobs: wget --user drewcassidy --password ${{ secrets.PILE_OF_ROCKS_PASS }} https://pileof.rocks/Secret/conformal-decals-dependencies-1.zip unzip conformal-decals-dependencies-*.zip -d ConformalDecals/dlls dotnet build --configuration Release ConformalDecals.sln - + - name: Build DLL working-directory: Source run: | mkdir -p ../GameData/ConformalDecals/Plugins dotnet build --configuration Release ConformalDecals.sln - + - name: Download KSP Dependencies run: | wget http://pileof.rocks/KSP/Shabby_v0.2.0.zip @@ -56,7 +55,7 @@ jobs: mv Shabby/GameData/Shabby GameData/ mv ModuleManager*.dll GameData/ mv B9PartSwitch/GameData/B9PartSwitch GameData/ - + - name: Upload Unbundled Build uses: actions/upload-artifact@v3 with: @@ -67,7 +66,7 @@ jobs: CHANGELOG.md LICENSE-ART.md LICENSE-SOURCE.md - + - name: Upload Bundled Build uses: actions/upload-artifact@v3 with: @@ -78,8 +77,8 @@ jobs: CHANGELOG.md LICENSE-ART.md LICENSE-SOURCE.md - - + + deploy: needs: build runs-on: ubuntu-latest @@ -97,15 +96,15 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install yaclog - + - name: Get version name and body run: | echo "VERSION_TITLE=$(yaclog show -n)" >> $GITHUB_ENV echo "$(yaclog show -mb)" >> RELEASE.md - - - name: Download Build Artifacts + + - name: Download Build Artifacts uses: actions/download-artifact@v3 - + - name: Zip Download Packages run: | mkdir bundled @@ -125,7 +124,7 @@ jobs: -F "notify-followers=yes" \ -F "zipball=@bundled/ConformalDecals-$VERSION_TITLE.zip" \ "https://spacedock.info/api/mod/2451/update" - + - name: Publish to Github uses: softprops/action-gh-release@v1 with: