Skip to content

Commit

Permalink
Fix release CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress committed Apr 25, 2024
1 parent 8acba03 commit 0b380d0
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 11 deletions.
30 changes: 25 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,33 @@ permissions:
contents: read

jobs:
release-notes:
check_branch:
runs-on: ubuntu-latest
outputs:
should_build: ${{ steps.permitted.outputs.result }}

if: github.repository_owner == 'visgl' && (github.ref == 'refs/heads/master' || endsWith(github.ref, '-release'))
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Fetch remote branches
run: |
git fetch origin --depth=1
- name: Check if on permitted branch
id: permitted
run: |
result=
branchName=$(git branch -a --contains $GITHUB_SHA | grep 'remotes/origin/' || echo "")
if [[ $branchName == *"master" || $branchName == *"-release" ]]; then
result=true
fi
echo "result=${result}" >> "$GITHUB_OUTPUT"
release:
runs-on: ubuntu-latest
needs: check_branch

if: ${{ github.repository_owner == 'visgl' && needs.check_branch.outputs.should_build }}

env:
ADMIN_TOKEN: ${{ secrets.ADMIN_TOKEN }}
Expand All @@ -21,9 +44,6 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Get git tags (https://github.com/actions/checkout/issues/206)
run: git fetch --tags -f

- name: Use Node.js
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Ref: http://keepachangelog.com/en/0.3.0/

### deck.gl v9.0 Prereleases

#### deck.gl [9.0.0-beta.11] - Apr 24 2024

- Publish NPM packages from CI (#8828)

#### deck.gl [9.0.0-beta.10] - Mar 20 2024

- Add Zoom and Compass widgets (#8072)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@math.gl/proj4": "^4.0.0",
"@probe.gl/bench": "^4.0.9",
"jsdom": "^20.0.0",
"ocular-dev-tools": "2.0.0-alpha.30",
"ocular-dev-tools": "2.0.0-alpha.31",
"pre-commit": "^1.2.2",
"pre-push": "^0.1.1",
"puppeteer": "^22.4.0",
Expand Down
2 changes: 1 addition & 1 deletion scripts/github-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ console.log(JSON.stringify(requestBody));

function getGitTag() {
try {
return execSync('git describe --exact-match HEAD', {
return execSync('git describe --tags --exact-match HEAD', {
stdio: [null, 'pipe', null],
encoding: 'utf-8'
}).trim();
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8857,10 +8857,10 @@ object.values@^1.1.7:
define-properties "^1.2.0"
es-abstract "^1.22.1"

[email protected].30:
version "2.0.0-alpha.30"
resolved "https://registry.yarnpkg.com/ocular-dev-tools/-/ocular-dev-tools-2.0.0-alpha.30.tgz#68f6928142ae5526267988c9ab297e2002194772"
integrity sha512-Kz/mRzI6OHX8ljMZTaal2+iwJGVLzfojiP4l0LgptNCu6vEyV48eVTBD4+rWOrD/uCTCLATKFhBytkMONWK41A==
[email protected].31:
version "2.0.0-alpha.31"
resolved "https://registry.yarnpkg.com/ocular-dev-tools/-/ocular-dev-tools-2.0.0-alpha.31.tgz#cfaae411812056ec4bf60a05ed013e2d27b5b062"
integrity sha512-01lIhqz7iZiJoFhvGIB2qoZQ5+HpGPc56pu5Vh5nTy8cz8UVNMLri2WQHwPBfaTF8Z7DXU5xWmzDH6lguU8sUQ==
dependencies:
"@babel/cli" "^7.14.5"
"@babel/core" "^7.14.5"
Expand Down

0 comments on commit 0b380d0

Please sign in to comment.