Skip to content

Commit

Permalink
Modifications to build process according to PR valinet#400
Browse files Browse the repository at this point in the history
  • Loading branch information
valinet committed Nov 18, 2021
1 parent 84df557 commit ff326d6
Showing 1 changed file with 31 additions and 7 deletions.
38 changes: 31 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
working-directory: build/Release
run: |
ep_setup_patch.exe
exit 0
exit /b 0
- name: Upload artifacts
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -154,26 +154,50 @@ jobs:
echo "::set-output name=data::$MY_STRING"
id: release_description

- name: Create/update release
- name: Create/update release (valinet)
uses: actions/create-release@v1
if: github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
if: github.repository_owner == 'valinet' && github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
id: create_release
with:
draft: false
prerelease: false
prerelease: ${{ !startsWith(github.event.head_commit.message, 'rel_') }}
release_name: ${{ steps.release_name.outputs.data }}
tag_name: ${{ steps.release_name.outputs.data }}_${{ steps.vars.outputs.sha_short }}
body: ${{ steps.release_description.outputs.data }}
env:
GITHUB_TOKEN: ${{ secrets.PAT }}

- name: Upload setup
- name: Upload setup (valinet)
uses: actions/upload-release-asset@v1
if: github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
if: github.repository_owner == 'valinet' && github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/Release/ep_setup.exe
asset_name: ep_setup.exe
asset_content_type: application/x-msdownload
env:
GITHUB_TOKEN: ${{ secrets.PAT }}

- name: Create/update release (forks)
uses: actions/create-release@v1
if: github.repository_owner != 'valinet' && github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
id: create_release_fork
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
draft: false
prerelease: ${{ !startsWith(github.event.head_commit.message, 'rel_') }}
release_name: ${{ steps.release_name.outputs.data }}
tag_name: ${{ steps.release_name.outputs.data }}_${{ steps.vars.outputs.sha_short }}
body: ${{ steps.release_description.outputs.data }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload setup (forks)
uses: actions/upload-release-asset@v1
if: github.repository_owner != 'valinet' && github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
with:
upload_url: ${{ steps.create_release_fork.outputs.upload_url }}
asset_path: ./build/Release/ep_setup.exe
asset_name: ep_setup.exe
asset_content_type: application/x-msdownload
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit ff326d6

Please sign in to comment.