diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 4f2358e..2e624b4 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -77,7 +77,7 @@ jobs: needs: - tag - build_and_test - if: ${{ github.event_name != 'pull_request' && needs.tag.outputs.prerelease == '' || needs.tag.outputs.prerelease-depth == '1' }} + if: ${{ github.event_name != 'pull_request' && needs.tag.outputs.prerelease-depth < 2 }} uses: ./.github/workflows/release.yml with: version: ${{ needs.tag.outputs.version }} diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index a4ea063..425840b 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -27,10 +27,6 @@ env: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 DOTNET_NOLOGO: true -defaults: - run: - shell: pwsh - jobs: tag: runs-on: ubuntu-latest @@ -40,7 +36,7 @@ jobs: minor: ${{ steps.version.outputs.minor }} patch: ${{ steps.version.outputs.patch }} prerelease: ${{ steps.version.outputs.prerelease }} - prerelease-depth: ${{ steps.determine-releasability.outputs.pre-release-depth }} + prerelease-depth: ${{ steps.get-prerelease-depth.outputs.prerelease_depth }} steps: - uses: actions/checkout@v2 with: @@ -61,10 +57,12 @@ jobs: echo major: ${{ steps.version.outputs.major }}, minor: ${{ steps.version.outputs.minor }}, patch: ${{ steps.version.outputs.patch }} echo prerelease: ${{ steps.version.outputs.prerelease }} - - name: determine releasability - id: determine-releasability + - name: get prerelease depth + id: get-prerelease-depth run: | - echo "prerelease-depth=$(echo '${{ steps.version.outputs.prerelease }}' | tr -cd '.' | wc -c | tr -d ' ')" >> "$GITHUB_OUTPUT" + echo "prerelease_depth=$(echo '${{ steps.version.outputs.prerelease }}' | tr -cd '.' | wc -c | tr -d ' ')" >> "$GITHUB_OUTPUT" + + - run: echo "${{ steps.get-prerelease-depth.outputs.prerelease_depth }}" # - run: | # git tag v${{ steps.version.outputs.version }} @@ -85,6 +83,4 @@ jobs: # - name: Version tag # uses: EndBug/latest-tag@v1.5.1 # with: - # ref: v${{ steps.version.outputs.version }} - - # Let's pretend this was a meaningful change \ No newline at end of file + # ref: v${{ steps.version.outputs.version }} \ No newline at end of file