From caed5378866b72e3e7c60ede5f5f62b4dc573289 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Rouill=C3=A9?= Date: Fri, 5 Nov 2021 05:11:53 +0100 Subject: [PATCH 1/2] Build on any push, release on master --- .github/workflows/build.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c60dcd8..36ca8e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,10 +6,7 @@ name: Build -on: - push: - branches: - - master +on: [push] env: SOLUTION_FILE_PATH: . @@ -74,10 +71,18 @@ jobs: working-directory: build/Release run: | Copy-Item ExplorerPatcher.amd64.dll dxgi.dll - + + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: bin + path: | + build/Release/ + - name: Generate release name shell: bash working-directory: build/Release + if: github.ref == 'refs/heads/master' run: | echo "::set-output name=data::$(./ep_generate_release_name.exe)" id: release_name @@ -85,6 +90,7 @@ jobs: - name: Generate release notes shell: bash working-directory: build/Release + if: github.ref == 'refs/heads/master' run: | MY_STRING=$(./ep_generate_release_description.exe ${{ steps.vars.outputs.sha_short }} ${{ steps.vars.outputs.branch }}) MY_STRING="${MY_STRING//'%'/'%25'}" @@ -95,6 +101,7 @@ jobs: - name: Create/update release uses: actions/create-release@v1 + if: github.ref == 'refs/heads/master' id: create_release with: draft: false @@ -107,6 +114,7 @@ jobs: - name: Upload dxgi.dll uses: actions/upload-release-asset@v1 + if: github.ref == 'refs/heads/master' env: GITHUB_TOKEN: ${{ secrets.PAT }} with: @@ -117,6 +125,7 @@ jobs: - name: Upload ExplorerPatcher.amd64.dll uses: actions/upload-release-asset@v1 + if: github.ref == 'refs/heads/master' env: GITHUB_TOKEN: ${{ secrets.PAT }} with: @@ -127,10 +136,11 @@ jobs: - name: Upload ExplorerPatcher.IA-32.dll uses: actions/upload-release-asset@v1 + if: github.ref == 'refs/heads/master' env: GITHUB_TOKEN: ${{ secrets.PAT }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./build/Release/ExplorerPatcher.IA-32.dll asset_name: ExplorerPatcher.IA-32.dll - asset_content_type: application/x-msdownload \ No newline at end of file + asset_content_type: application/x-msdownload From 4c82dcbd5f83898a3c453af0626295b999979607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Rouill=C3=A9?= Date: Fri, 5 Nov 2021 05:16:04 +0100 Subject: [PATCH 2/2] Build on push_request too --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 36ca8e3..b98f41e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ name: Build -on: [push] +on: [push, pull_request] env: SOLUTION_FILE_PATH: .