Skip to content

Commit 42de654

Browse files
release?
1 parent 68fa499 commit 42de654

File tree

3 files changed

+35
-41
lines changed

3 files changed

+35
-41
lines changed

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ runs:
1212
- run: npm install -g npm@latest
1313
shell: bash
1414
- run: npm clean-install
15-
shell: bash
15+
shell: bash

.github/workflows/create-sign-and-commit-tarball.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,44 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- id: release
18-
uses: google-github-actions/release-please-action@v3
19-
with:
20-
release-type: node
21-
package-name: bson
22-
# Example: chore(main): release 5.7.0 [skip-ci]
23-
# ${scope} - parenthesis included, base branch name
24-
pull-request-title-pattern: 'chore${scope}: release ${version} [skip-ci]'
25-
pull-request-header: 'Please run the release_notes action before releasing to generate release highlights'
26-
changelog-path: HISTORY.md
27-
default-branch: main
18+
uses: google-github-actions/release-please-action@v4
2819

29-
# If release-please created a release, publish to npm
30-
- if: true
31-
uses: actions/checkout@v3
3220
- if: true
21+
run: echo ${{ steps.release.outputs }}
22+
- if: true
23+
run: echo ${{ steps.release.outputs.version }}
24+
# If release-please created a release, publish to npm
25+
- if: ${{ steps.release.outputs.release_created }}
26+
uses: actions/checkout@v4
27+
- if: ${{ steps.release.outputs.release_created }}
3328
name: actions/setup
3429
uses: ./.github/actions/setup
35-
- if: true
36-
name: Create, sign, and commit signed tarball
37-
uses: mongodb-labs/drivers-github-tools/garasign/git-sign@main
38-
with:
39-
command: "$(pwd)/.github/workflows/create-sign-and-commit-tarball.sh ${{ env.PACKAGE_VERSION }} ${{ vars.GPG_KEY_ID }}"
30+
- if: ${{ steps.release.outputs.release_created }}
31+
run: npm pack
32+
shell: bash
33+
- if: ${{ steps.release.outputs.release_created }}
34+
run: |
35+
echo "PACKAGE_VERSION=${env.PACKAGE_VERSION}" >> "$GITHUB_ENV"
36+
echo "PACKAGE_FILE=mongodb-${steps.release.outputs.}.tgz" >> "$GITHUB_ENV"
37+
- if: ${{ steps.release.outputs.release_created }}
38+
name: Create detached signature
39+
uses: mongodb-labs/drivers-github-tools/garasign/gpg-sign@main
40+
with:
41+
filenames: ${{ env.PACKAGE_FILE }}
4042
garasign_username: ${{ secrets.GRS_CONFIG_USER1_USERNAME }}
4143
garasign_password: ${{ secrets.GRS_CONFIG_USER1_PASSWORD }}
4244
artifactory_username: ${{ secrets.ARTIFACTORY_USER }}
43-
artifactory_password: ${{ secrets.TEMP_ARTIFACTORY_TOKEN }}
44-
- if: true
45-
run: echo 'done!!!!!!!!!!!'
46-
# run: npm publish --provenance
45+
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
46+
- if: ${{ steps.release.outputs.release_created }}
47+
name: "Upload artifacts"
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: ${{ env.PACKAGE_FILE }}
51+
path: |
52+
${{ env.PACKAGE_FILE }}
53+
${{ env.PACKAGE_FILE }}.sig
54+
retention-days: 3
55+
- if: false
56+
run: npm publish --provenance
57+
env:
58+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)