diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 80d2524..b151ba5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,3 +62,18 @@ jobs: - run: npm install - run: npm run build - run: npm publish --access public + + # Publishing the package and announcing it are separate concerns: this job is + # kept apart from `publish` so the credential-bearing job keeps `contents: read`. + release: + needs: publish + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: GitHub Release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true + # A SemVer pre-release suffix is the only place a hyphen appears in the tag. + prerelease: ${{ contains(github.ref_name, '-') }}