Skip to content

Commit c3be248

Browse files
committed
fix: npm publish in github release.yml action
1 parent 80382e7 commit c3be248

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ on:
55
jobs:
66
release:
77
runs-on: ubuntu-latest
8+
permissions:
9+
id-token: write
10+
contents: read
11+
id_tokens:
12+
NPM_ID_TOKEN:
13+
aud: "npm:registry.npmjs.org"
814
container:
915
image: ghcr.io/commonknowledge/do-app-baseimage-django-node:364385f9d196a2bbe2d5faea025520cc0316501f
1016
# Workaround for: https://github.com/actions/checkout/issues/211
@@ -37,11 +43,11 @@ jobs:
3743
- run: make install
3844
- run: chmod +x .github/bin/wait-for-it.sh
3945
- run: .github/bin/wait-for-it.sh db:5432
46+
# TODO: Fix linting errors and restore this line
4047
# - run: make lint
4148
- run: make prepare-release
4249
env:
4350
GITHUB_REF: v1.0.1
4451
- run: make release
4552
env:
46-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4753
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ prepare-release: clean-all set-release-version build-js build-python
124124
.PHONY: release
125125
release:
126126
echo //registry.npmjs.org/:_authToken=$$NPM_TOKEN > ~/.npmrc
127-
npm publish
127+
npm publish --access public
128128
poetry config pypi-token.pypi $$PYPI_TOKEN
129129
poetry publish
130130

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
2-
"name": "groundwork-django",
2+
"name": "@commonknowledgecoop/groundwork-django",
33
"version": "0.1.0",
4-
"repository": "https://github.com/commonknowledge/groundwork.git",
4+
"repository": {
5+
"type": "git",
6+
"url": "git+https://github.com/commonknowledge/groundwork.git"
7+
},
58
"description": "An integrated Django and Javascript framework for people who build tools for organisers.",
69
"author": "Common Knowledge <developers@commonknowledge.coop>",
710
"license": "GPL-3.0-only",

0 commit comments

Comments
 (0)