Skip to content

Commit

Permalink
Automatically fast-forward the release branch on release
Browse files Browse the repository at this point in the history
  • Loading branch information
drewcassidy committed Mar 12, 2022
1 parent d1f3d1f commit ff262d5
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 17 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ff-release.yml
Original file line number Diff line number Diff line change
@@ -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
33 changes: 16 additions & 17 deletions .github/workflows/ksp-publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

name: build
name: Build and Release
on: [ push ]

jobs:
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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:
Expand All @@ -67,7 +66,7 @@ jobs:
CHANGELOG.md
LICENSE-ART.md
LICENSE-SOURCE.md
- name: Upload Bundled Build
uses: actions/upload-artifact@v3
with:
Expand All @@ -78,8 +77,8 @@ jobs:
CHANGELOG.md
LICENSE-ART.md
LICENSE-SOURCE.md

deploy:
needs: build
runs-on: ubuntu-latest
Expand All @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit ff262d5

Please sign in to comment.