From 46ce795281ee3a294c52f27b6601111dafd4885d Mon Sep 17 00:00:00 2001 From: Florent Benoit Date: Thu, 16 Mar 2023 21:19:16 +0100 Subject: [PATCH] chore: publish to npmjs the API module for releases fixes https://github.com/containers/podman-desktop/issues/1468 Change-Id: I4287d2c311e989e756fafee47ab2091eb40d9916 Signed-off-by: Florent Benoit --- .github/workflows/release.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bc99c640885..2330ae0a824 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -231,3 +231,21 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: id: ${{ needs.tag.outputs.releaseId}} + + publish: + needs: [tag, release] + name: Publish + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Set-up npmjs auth token + run: printf "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}\n" >> ~/.npmrc + + - name: Publish API to npmjs + run: | + echo "Using version ${{ needs.tag.outputs.desktopVersion }}" + sed -i "s#version\":\ \"\(.*\)\",#version\":\ \"${{ needs.tag.outputs.desktopVersion }}\",#g" packages/extension-api/package.json + cd packages/extension-api && yarn publish --tag latest --no-git-tag-version --new-version "${{ needs.tag.outputs.desktopVersion }}" --access public