Skip to content

Commit

Permalink
Create draft release, build docs on draft publish (#2584)
Browse files Browse the repository at this point in the history
<!-- Reference any GitHub issues resolved by this PR -->

Closes #

## Introduced changes

<!-- A brief description of the changes -->

- Instead of immediately publishing docs and release, create a draft
release. Publish docs on draft publication.

## Checklist

<!-- Make sure all of these are complete -->

- [x] Linked relevant issue
- [x] Updated relevant documentation
- [x] Added relevant tests
- [x] Performed self-review of the code
- [x] Added changes to `CHANGELOG.md`
  • Loading branch information
cptartur committed Oct 17, 2024
1 parent 4472f34 commit 2da7fb6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

release:
types:
- released

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ jobs:
uses: taiki-e/create-gh-release-action@72d65cee1f8033ef0c8b5d79eaf0c45c7c578ce3
with:
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
changelog: CHANGELOG.md
allow-missing-changelog: false
title: $version
Expand All @@ -248,13 +249,3 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ steps.create-release.outputs.computed-prefix }}${{ steps.create-release.outputs.version }}

deploy-docs:
name: Deploy documentation
needs: [ create-release, verify-version ]
permissions:
contents: read
pages: write
id-token: write
if: ${{ !contains(needs.verify-version.outputs.version, '-') }}
uses: ./.github/workflows/docs.yml

0 comments on commit 2da7fb6

Please sign in to comment.