diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb15291790b..4bbc034e517 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} @@ -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: diff --git a/CHANGELOG.md b/CHANGELOG.md index bbd62d4bbb4..6d416368df2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/package.json b/package.json index 69e2b7a05f0..8ab5f49d29f 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/scripts/github-release.js b/scripts/github-release.js index 76c16eab492..01f5cc90197 100644 --- a/scripts/github-release.js +++ b/scripts/github-release.js @@ -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(); diff --git a/yarn.lock b/yarn.lock index 3abc45f2782..7423591de34 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8857,10 +8857,10 @@ object.values@^1.1.7: define-properties "^1.2.0" es-abstract "^1.22.1" -ocular-dev-tools@2.0.0-alpha.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== +ocular-dev-tools@2.0.0-alpha.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"