From 10edbb940479420eb107275068b273167a35e22b Mon Sep 17 00:00:00 2001 From: Naman Agrawal Date: Thu, 6 Jul 2023 20:43:43 -0400 Subject: [PATCH] Fix draft release Action formatting and extra key (#49) * Fix draft release Action formatting and extra key * Update documentation --- .github/workflows/draft-release.yml | 3 +-- README.md | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 464f70ad..6fe80801 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -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 @@ -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 \ diff --git a/README.md b/README.md index 7fe7f96c..395febec 100644 --- a/README.md +++ b/README.md @@ -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.