Skip to content

Commit 09b5026

Browse files
committed
Workaround for GH Actions stripping permissions
Closes #1665
1 parent f5ac262 commit 09b5026

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

.github/workflows/ci.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
uses: actions/upload-artifact@v2
4343
with:
4444
name: npm-package
45-
path: ./release
45+
path: ./release-npm-package
4646

4747
linux-amd64:
4848
needs: release
@@ -53,7 +53,7 @@ jobs:
5353
uses: actions/download-artifact@v2
5454
with:
5555
name: npm-package
56-
path: ./release
56+
path: ./release-npm-package
5757
- name: Run ./ci/steps/release-static.sh
5858
uses: ./ci/container
5959
with:
@@ -73,7 +73,7 @@ jobs:
7373
uses: actions/download-artifact@v2
7474
with:
7575
name: npm-package
76-
path: ./release
76+
path: ./release-npm-package
7777
- name: Run ./ci/steps/release-static.sh
7878
uses: ./ci/container/arm64
7979
with:
@@ -93,7 +93,7 @@ jobs:
9393
uses: actions/download-artifact@v2
9494
with:
9595
name: npm-package
96-
path: ./release
96+
path: ./release-npm-package
9797
- run: brew unlink node@12
9898
- run: brew install node
9999
- run: ./ci/steps/release-static.sh

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
dist*
44
out*
55
release/
6+
release-npm-package/
67
release-static/
78
release-packages/
89
release-gcp/

ci/steps/publish-npm.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ main() {
66
source ./ci/lib.sh
77

88
if [[ ${CI-} ]]; then
9-
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
9+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >~/.npmrc
1010
fi
1111

12-
download_artifact npm-package ./release
12+
download_artifact npm-package ./release-npm-package
1313
# https://github.com/actions/upload-artifact/issues/38
14-
chmod +x $(grep -rl '^#!/.*' release)
14+
tar -xzf release-npm-package/package.tar.gz
1515
yarn publish --non-interactive release
1616
}
1717

ci/steps/release-static.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ main() {
55
cd "$(dirname "$0")/../.."
66

77
# https://github.com/actions/upload-artifact/issues/38
8-
chmod +x $(grep -rl '^#!/.*' release)
8+
tar -xzf release-npm-package/package.tar.gz
99

1010
yarn release:static
1111
yarn test:static-release

ci/steps/release.sh

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ main() {
99
yarn build
1010
yarn build:vscode
1111
yarn release
12+
13+
# https://github.com/actions/upload-artifact/issues/38
14+
mkdir -p release-npm-package
15+
tar -czf release-npm-package/package.tar.gz release
1216
}
1317

1418
main "$@"

0 commit comments

Comments
 (0)