Skip to content

Commit

Permalink
Bump version to 0.5.6.2 and add job to publish release on tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
Holt59 committed Jul 14, 2024
1 parent 0d03716 commit 778dcda
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 9 deletions.
47 changes: 39 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Build USVFS
on:
push:
branches: [master, dev/cmake]
tags:
- "*"
pull_request:
types: [opened, synchronize, reopened]

Expand Down Expand Up @@ -65,19 +67,14 @@ jobs:
path: ./test/bin

# merge x86 / x64 artifacts
merge-artifacts:
merge-artifacts-for-tests:
runs-on: ubuntu-latest
name: Merge Artifacts
name: Merge Test Artifacts
needs: build
strategy:
matrix:
config: [Debug, Release]
steps:
- name: Merge USVFS install
uses: actions/upload-artifact/merge@v4
with:
name: usvfs_${{ matrix.config }}
pattern: usvfs_${{ matrix.config }}_*
- name: Merge USVFS libs
uses: actions/upload-artifact/merge@v4
with:
Expand All @@ -94,9 +91,21 @@ jobs:
name: usvfs-tests_${{ matrix.config }}
pattern: usvfs-tests_${{ matrix.config }}_*

# merge x86 / x64 artifacts
merge-artifacts-for-release:
runs-on: ubuntu-latest
name: Merge Install Artifacts
needs: build
steps:
- name: Merge USVFS install
uses: actions/upload-artifact/merge@v4
with:
name: usvfs
pattern: usvfs_*

test:
name: Test USVFS
needs: merge-artifacts
needs: merge-artifacts-for-tests
runs-on: windows-2022
strategy:
matrix:
Expand Down Expand Up @@ -136,3 +145,25 @@ jobs:
if-no-files-found: ignore
retention-days: 7
overwrite: true

publish:
if: github.ref_type == 'tag'
needs: [merge-artifacts-for-release, test]
runs-on: windows-2022
permissions:
contents: write
steps:
- name: Download Artifact
uses: actions/download-artifact@master
with:
name: usvfs
path: ./install

- name: Create USVFS Base archive
run: 7z a usvfs_${{ github.ref_name }}.7z ./install/*

- name: Publish Release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: gh release create --draft=false --notes="Release ${{ github.ref_name }}" "${{ github.ref_name }}" ./usvfs_${{ github.ref_name }}.7z
2 changes: 1 addition & 1 deletion include/usvfs/usvfs_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define USVFS_VERSION_MAJOR 0
#define USVFS_VERSION_MINOR 5
#define USVFS_VERSION_BUILD 6
#define USVFS_VERSION_REVISION 1
#define USVFS_VERSION_REVISION 2

#define USVFS_BUILD_STRING ""
#define USVFS_BUILD_WSTRING L""
Expand Down

0 comments on commit 778dcda

Please sign in to comment.