diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 19781be..9456fe2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,8 @@ name: Build USVFS on: push: branches: [master, dev/cmake] + tags: + - "*" pull_request: types: [opened, synchronize, reopened] @@ -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: @@ -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: @@ -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 diff --git a/include/usvfs/usvfs_version.h b/include/usvfs/usvfs_version.h index 71ded55..e998df3 100644 --- a/include/usvfs/usvfs_version.h +++ b/include/usvfs/usvfs_version.h @@ -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""