diff --git a/.github/workflows/shared-auto-release.yml b/.github/workflows/shared-auto-release.yml index 95c5e673..849da429 100644 --- a/.github/workflows/shared-auto-release.yml +++ b/.github/workflows/shared-auto-release.yml @@ -17,13 +17,60 @@ on: type: string required: false default: '["ubuntu-latest"]' - + outputs: + id: + description: The ID of the release that was created or updated. + value: ${{ jobs.release.outputs.id }} + name: + description: The name of the release + value: ${{ jobs.release.outputs.name }} + tag_name: + description: The name of the tag associated with the release. + value: ${{ jobs.release.outputs.tag_name }} + body: + description: The body of the drafted release. + value: ${{ jobs.release.outputs.body }} + html_url: + description: The URL users can navigate to in order to view the release + value: ${{ jobs.release.outputs.html_url }} + upload_url: + description: The URL for uploading assets to the release, which could be used by GitHub Actions for additional uses, for example the @actions/upload-release-asset GitHub Action. + value: ${{ jobs.release.outputs.upload_url }} + major_version: + description: The next major version number. For example, if the last tag or release was v1.2.3, the value would be v2.0.0. + value: ${{ jobs.release.outputs.major_version }} + minor_version: + description: The next minor version number. For example, if the last tag or release was v1.2.3, the value would be v1.3.0. + value: ${{ jobs.release.outputs.minor_version }} + patch_version: + description: The next patch version number. For example, if the last tag or release was v1.2.3, the value would be v1.2.4. + value: ${{ jobs.release.outputs.patch_version }} + resolved_version: + description: The next resolved version number, based on GitHub labels. + value: ${{ jobs.release.outputs.resolved_version }} + exists: + description: Tag exists so skip new release issue + value: ${{ jobs.check-duplicate.outputs.exists }} + permissions: {} jobs: release: runs-on: ${{ fromJSON(inputs.runs-on) }} environment: release + outputs: + id: ${{ steps.drafter.outputs.id }} + name: ${{ steps.drafter.outputs.name }} + tag_name: ${{ steps.drafter.outputs.tag_name }} + body: ${{ steps.drafter.outputs.body }} + html_url: ${{ steps.drafter.outputs.html_url }} + upload_url: ${{ steps.drafter.outputs.upload_url }} + major_version: ${{ steps.drafter.outputs.major_version }} + minor_version: ${{ steps.drafter.outputs.minor_version }} + patch_version: ${{ steps.drafter.outputs.patch_version }} + resolved_version: ${{ steps.drafter.outputs.resolved_version }} + exists: ${{ steps.drafter.outputs.exists }} + steps: - uses: actions/create-github-app-token@v1 id: github-app @@ -46,6 +93,7 @@ jobs: # Drafts your next Release notes as Pull Requests are merged into "main" - uses: cloudposse/github-action-auto-release@v2 + id: drafter with: token: ${{ steps.github-app.outputs.token }} publish: ${{ inputs.publish }}