diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 519e6a262..04a9eaed9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,8 +17,7 @@ jobs: - name: extract tag id: tag run: - echo ::set-output name=TAG::$(echo $GITHUB_REF | sed -r - 's/.*(console-subscriber|console-api|tokio-console).*/\1/')) + echo ::set-output name=TAG::$(echo $GITHUB_REF | sed -r 's/.*(console-subscriber|console-api|tokio-console).*/\1/') - uses: taiki-e/create-gh-release-action@v1 with: changelog: ${{ steps.tag.outputs.TAG }}/CHANGELOG.md @@ -27,18 +26,17 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} upload-bins: - # only publish from the origin repository - if: github.repository_owner == 'tokio-rs' - # only upload binaries if the tag is a `tokio-console` release - if: contains(github.ref, 'tokio-console') + # only upload binaries if we're on the origin repository and if the tag is a + # `tokio-console` release + if: ${{ github.repository_owner == 'tokio-rs' && contains(github.ref, 'tokio-console') }} strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - uses: taiki-e/upload-rust-binary-action@v1 - with: - bin: tokio-console - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - uses: taiki-e/upload-rust-binary-action@v1 + with: + bin: tokio-console + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file