diff --git a/.github/actions/build-js/action.yml b/.github/actions/build-js/action.yml index ef916d2..39fc407 100644 --- a/.github/actions/build-js/action.yml +++ b/.github/actions/build-js/action.yml @@ -24,6 +24,7 @@ runs: node-version-file: 'js/.nvmrc' cache: npm cache-dependency-path: js/package-lock.json + registry-url: 'https://npm.pkg.github.com' - name: Install dependencies run: npm ci diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4c82528..9d403ae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,15 +2,21 @@ name: Release on: push: + branches: + - feature/isolate-js tags: - '*' jobs: build: - name: Publish package to Jazzband private PyPI + name: Publish packages runs-on: ubuntu-latest if: github.repository == 'jazzband/django-cookie-consent' + permissions: + contents: read + packages: write + steps: - uses: actions/checkout@v3 with: @@ -37,10 +43,17 @@ jobs: python setup.py sdist --format=gztar bdist_wheel twine check dist/* - - name: Upload packages to Jazzband - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: jazzband - password: ${{ secrets.JAZZBAND_RELEASE_KEY }} - repository_url: https://jazzband.co/projects/django-cookie-consent/upload + # - name: Upload packages to Jazzband private PyPI + # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + # uses: pypa/gh-action-pypi-publish@release/v1 + # with: + # user: jazzband + # password: ${{ secrets.JAZZBAND_RELEASE_KEY }} + # repository_url: https://jazzband.co/projects/django-cookie-consent/upload + + - name: Publish NPM package to Github + # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + run: npm pack + working-directory: js + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}