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 <fbenoit@redhat.com>
This commit is contained in:
Florent Benoit 2023-03-16 21:19:16 +01:00 committed by Florent BENOIT
parent efb0d8496c
commit 46ce795281

View file

@ -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