Skip to content

Commit

Permalink
Workflow improvements (#179) #none
Browse files Browse the repository at this point in the history
* Actions: Archive Windows Release with preinstalled 7zip

* Split the bumping and releasing
  • Loading branch information
IhateTrains authored Mar 18, 2021
1 parent 6260335 commit 30c6259
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 22 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/bump_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Bump version
on:
push:
branches:
- master
jobs:
bump_tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
persist-credentials: false
- name: "Bump version and push tag"
uses: anothrNick/github-tag-action@master
env:
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
DEFAULT_BUMP: patch
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
name: Bump version and create release
name: Create release
on:
push:
branches:
- master
tags:
- '*'
jobs:
bump_tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- name: "Bump version and push tag"
uses: anothrNick/github-tag-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: patch

create_release:
needs: bump_tag
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
Expand All @@ -26,20 +13,21 @@ jobs:
- name: "Get previous tag"
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- name: "msbuild"
- name: "Init submodules"
run: |
git submodule update --init --recursive
- name: "Build solution"
run: |
cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\"
.\MSBuild.exe -m -p:Configuration=Release $Env:GITHUB_WORKSPACE\ImperatorToCK3.sln
- name: "Archive release"
uses: thedoctor0/zip-release@master
with:
path: "Release"
filename: "Release.zip"
run: |
cd "C:\Program Files\7-Zip\"
.\7z.exe a $Env:GITHUB_WORKSPACE\ImperatorToCK3-${{ steps.previoustag.outputs.tag }}.zip $Env:GITHUB_WORKSPACE\Release\*
- name: "Release"
uses: ncipollo/release-action@v1
with:
tag_name: ${{ steps.previoustag.outputs.tag }}
release_name: ${{ steps.previoustag.outputs.tag }}
artifacts: "Release.zip"
artifacts: ImperatorToCK3-${{ steps.previoustag.outputs.tag }}.zip
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 30c6259

Please sign in to comment.