From 93b9eabf717b516e89ec0e204343d0ae7b846892 Mon Sep 17 00:00:00 2001 From: Justin Fiedler Date: Thu, 14 Oct 2021 20:32:19 -0400 Subject: [PATCH] chore: made release version required (#150) * chore: made release version required * chore: added Git and NPM user configuration for release --- .github/workflows/release.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index efd8ea0..789bd24 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,9 +4,8 @@ on: workflow_dispatch: inputs: packageVersion: - description: "The version to publish (e.g. prerelease, patch, major). Defaults to lerna conventional commits." - required: false - default: "" + description: "The version to publish (e.g. prerelease, patch, major, 1.2.3)" + required: true distTag: description: "The dist-tag to publish (e.g. latest, beta)" required: true @@ -56,6 +55,16 @@ jobs: - name: Test run: yarn test + - name: Configure Git User + run: | + git config --global user.name amplitude-sdk-bot + git config --global user.email amplitude-sdk-bot@users.noreply.github.com + + - name: Configure NPM User + run: | + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_PUBLISH_TOKEN }}" > ~/.npmrc + npm whoami + - name: Publish to NPM run: | lerna publish ${{ env.PACKAGE_VERSION }} --dist-tag ${{ env.DIST_TAG }} --yes