Skip to content

Commit

Permalink
Work around the whole determinePublicationType-job and the deprecatio…
Browse files Browse the repository at this point in the history
…n message on the regex action.
  • Loading branch information
danielcweber committed Mar 16, 2023
1 parent 9198476 commit 4d17782
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,6 @@ env:
DotNetVersion: '7.0.102'

jobs:
determinePublicationType:
runs-on: ubuntu-latest

outputs:
createRelease: ${{ github.event_name == 'push' && steps.version-regex.outputs.match != '' }}
pushToGithubPackages: ${{ github.event_name == 'push' && vars.PUSH_TO_GITHUB_PACKAGES == 'true' }}

steps:
- name: Determine type of publication
uses: actions-ecosystem/[email protected]
id: version-regex
with:
text: ${{ github.ref }}
regex: '^refs/heads/\d+\.x$'

build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -176,9 +162,9 @@ jobs:
branch-suffix: short-commit-hash

push:
needs: [ determinePublicationType, build, test-linux, test-windows ]
needs: [ build, test-linux, test-windows ]
runs-on: ubuntu-latest
if: ${{ needs.determinePublicationType.outputs.pushToGithubPackages == 'true' }}
if: ${{ github.event_name == 'push' && vars.PUSH_TO_GITHUB_PACKAGES == 'true' }}

steps:

Expand Down Expand Up @@ -208,9 +194,9 @@ jobs:
min-versions-to-keep: 10

release:
needs: [ determinePublicationType, build, test-linux, test-windows ]
needs: [ build, test-linux, test-windows ]
runs-on: ubuntu-latest
if: ${{ needs.determinePublicationType.outputs.createRelease == 'true' }}
if: ${{ github.event_name == 'push' && github.event_name != 'main' }}

steps:
- uses: actions/download-artifact@v2
Expand Down

0 comments on commit 4d17782

Please sign in to comment.