Skip to content

Commit

Permalink
Fix version handling and make some secrets optional (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Jun 5, 2024
1 parent 6a1c75d commit 5065461
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/update-action-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ jobs:
run: |
export VERSION=$(cat .github/workflows/version.txt)
echo "VERSION=$VERSION" >> $GITHUB_ENV
git push origin ":${VERSION}"
git push origin ":v${VERSION}"
- name: Create a new signed tag
uses: mongodb-labs/drivers-github-tools/git-sign@v2
with:
command: git tag -m "Update tag" -s --local-user=${{ env.GPG_KEY_ID }} ${{ env.VERSION }}"
command: git tag -m "Update tag" -s --local-user=${{ env.GPG_KEY_ID }} v${{ env.VERSION }}"

- name: Push the tag
run:
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ The action requires `id-token: write` permissions.
> You *must* use the `actions/checkout` action prior to calling the `setup` action,
> Since the `setup` action sets up git config that would be overridden by the
> `actions/checkout action`
>
> The following keys MUST be defined in the ``AWS_SECRET_ID`` vault:
> `artifactory-username`, `artifactory-password`, `garasign-username`
> `garasign-password`, `gpg-key-id`. If uploading to an S3 bucket, also define
> `release-assets-bucket`.

## Signing tools

Expand Down
4 changes: 2 additions & 2 deletions setup/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ mkdir $S3_ASSETS

echo "Set up global variables"
cat <<EOF >> $GITHUB_ENV
AWS_BUCKET=$RELEASE_ASSETS_BUCKET
AWS_BUCKET=${RELEASE_ASSETS_BUCKET:-}"
GPG_KEY_ID=$GPG_KEY_ID
GPG_PUBLIC_URL=$GPG_PUBLIC_URL
GPG_PUBLIC_URL=${GPG_PUBLIC_URL:-}"
GARASIGN_ENVFILE=$GARASIGN_ENVFILE
ARTIFACTORY_REGISTRY=$ARTIFACTORY_REGISTRY
RELEASE_ASSETS=$RELEASE_ASSETS
Expand Down

0 comments on commit 5065461

Please sign in to comment.