Skip to content

Commit

Permalink
Fix draft release Action formatting and extra key (#49)
Browse files Browse the repository at this point in the history
* Fix draft release Action formatting and extra key

* Update documentation
  • Loading branch information
namanaman authored Jul 7, 2023
1 parent 9e83464 commit 10edbb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
git add package.json package-lock.json
git commit -m "Bump version to $NEW_VERSION"
git push -u origin $BRANCH_NAME
gh pr create -B main -H $BRANCH_NAME --title 'Upgrade NWJDS package version to $NEW_VERSION' --body 'Created by Github Action'
gh pr create -B main -H $BRANCH_NAME --title "Upgrade NWJDS package version to $NEW_VERSION" --body "Created by Github Action"
RELEASE_SHA=$(git rev-parse HEAD)
echo ::set-output name=new_version::$NEW_VERSION
echo ::set-output name=release_sha::$RELEASE_SHA
Expand All @@ -48,7 +48,6 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ needs.update-version.outputs.release_sha }}
ssh-key: ${{secrets.YOUR_SECRET_KEY}}
- run: |
gh release create ${{ needs.update-version.outputs.new_version }} \
--draft \
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Note: do not push directly to the gh-pages branch.

1. Go to the [Draft Release GitHub Action](https://github.com/newjersey/njwds/actions/workflows/draft-release.yml)
2. Click the "Run workflow" dropdown, keep the branch set to `main`, and update the Semver Level based on what has changed since the previous release ([semver documentation](https://semver.org/)). Click the green button to "Run workflow".
3. Confirm that this action ran successfully by checking that the `package.json` file's version has been bumped according to the level you set to the release (e.g. minor release changes version from 0.1.0 to 0.2.0). Go to the [GitHub Releases page](https://github.com/newjersey/njwds/releases) and confirm that you see a new draft release with this version.
4. On the releases page, click the pencil icon on the top right to Edit the release. Document what has changed in this release; be sure to note any breaking changes. Once all looks good, click "Publish release" at the bottom.
5. This will automatically trigger the [Publish Release GitHub Action](https://github.com/newjersey/njwds/actions/workflows/publish-release.yml). Confirm this action succeeded by checking the the [NJWDS package](https://www.npmjs.com/package/@newjersey/njwds) on the NPM registry.
3. This should create a new Pull Request bumping the `package.json` file's version according to the level you set to the release (e.g. minor release changes version from 0.1.0 to 0.2.0). Rebase & merge this PR into the `main` branch.
4. Go to the [GitHub Releases page](https://github.com/newjersey/njwds/releases) and confirm that you see a new draft release with this version. (Note that this will automatically happen after Step 2, and is not dependent on Step 3)
5. On the releases page, click the pencil icon on the top right to Edit the release. Document what has changed in this release; be sure to note any breaking changes. Once all looks good, click "Publish release" at the bottom.
6. This will automatically trigger the [Publish Release GitHub Action](https://github.com/newjersey/njwds/actions/workflows/publish-release.yml). Confirm this action succeeded by checking the the [NJWDS package](https://www.npmjs.com/package/@newjersey/njwds) on the NPM registry.

0 comments on commit 10edbb9

Please sign in to comment.