Skip to content

Commit f7d2f76

Browse files
committed
fix(ci): Only set CI env in specific steps.
Because if it's set in all of them things don't work.
1 parent 4ea02c6 commit f7d2f76

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

.github/workflows/release.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ on:
99
- API.md
1010
workflow_dispatch: {}
1111

12-
env:
13-
CI: "true"
14-
1512
jobs:
1613
release_github:
1714
runs-on: ubuntu-latest
@@ -57,18 +54,35 @@ jobs:
5754
python-version: 3.12.3
5855
- name: Install NPM dependencies
5956
run: npx projen install:ci
57+
env:
58+
CI: "true"
6059
- name: Build
60+
env:
61+
CI: "true"
6162
run: npx projen build --verbose
6263
- name: Release
64+
env:
65+
CI: "true"
6366
run: npx projen release
67+
- name: Store release data
68+
id: release_data
69+
run: |
70+
echo "tag=$(cat dist/releasetag.txt)" >> $GITHUB_OUTPUT
71+
echo "version=$(cat dist/version.txt)" >> $GITHUB_OUTPUT
72+
echo "changelog=$(cat dist/changelog.md)" >> $GITHUB_OUTPUT
73+
- name: Output release data
74+
run: |
75+
echo ${{ steps.release_data.outputs.tag }}
76+
echo ${{ steps.release_data.outputs.version }}
77+
echo ${{ steps.release_data.outputs.changelog }}
6478
- name: Release GitHub
6579
env:
6680
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6781
GITHUB_REPOSITORY: ${{ github.repository }}
6882
GITHUB_REF: ${{ github.ref }}
6983
run: errout=$(mktemp); gh release create $(cat dist/releasetag.txt) -R $GITHUB_REPOSITORY -F dist/changelog.md -t $(cat dist/releasetag.txt) --target $GITHUB_REF 2> $errout && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q "Release.tag_name already exists" $errout; then cat $errout; exit $exitcode; fi
7084
- name: Create JS Artifact
71-
run: rm -rf dist/js && npx projen package:js
85+
run: rm -rf dist/js && npx projen package:js && ls -la dist/js
7286
- name: Release JS Artifact
7387
env:
7488
NPM_DIST_TAG: latest

0 commit comments

Comments
 (0)