Skip to content

Commit

Permalink
Merge pull request #163 from guardian/jsh/add-npm-release
Browse files Browse the repository at this point in the history
Add npm release
  • Loading branch information
jonathonherbert authored Nov 13, 2023
2 parents c6b777d + ea824e1 commit 4f61884
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ jobs:
distribution: corretto
java-version: 11
cache: sbt
- name: Release Production to Sonatype
- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
registry-url: https://registry.npmjs.org
- name: Release Production to Sonatype and NPM
run: |
VERSION=$(git describe --tags | cut -f2 -d"@")
if [[ ${VERSION:0:1} == "v" ]] ; then
Expand All @@ -62,9 +66,11 @@ jobs:
echo $PGP_SECRET | base64 --decode | gpg --batch --import
export GPG_TTY=$(tty)
echo "Releasing version $VERSION Sonatype as production"
yes | sbt -DRELEASE_TYPE=production "clean" "release cross release-version $VERSION with-defaults"
yes | sbt -DRELEASE_TYPE=production "clean" "release cross release-version $VERSION with-defaults" "project typescriptClasses" "releaseNpm $VERSION"
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.8.0

0 comments on commit 4f61884

Please sign in to comment.