Bump go.mongodb.org/mongo-driver from 1.12.0 to 1.12.1 (#392) #42
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- "*" | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: "Tag to release" | |
required: true | |
jobs: | |
ci: | |
name: Goreleaser CI | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "stable" | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
version: latest | |
args: release --snapshot --skip-publish --clean --skip-sign | |
goreleaser: | |
name: Run GoReleaser | |
needs: ci | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "stable" | |
- name: Install UPX | |
uses: crazy-max/ghaction-upx@v3 | |
with: | |
install-only: true | |
# only run this step when the tag is not already created | |
- if: startsWith(github.ref, 'refs/tags/') != 'true' && github.event.inputs.tag != '' | |
name: Create and Push Tag | |
run: |- | |
git config --global user.email "[email protected]" | |
git config --global user.name "Divanshu Chauhan" | |
tag=${{ github.event.inputs.tag }} # if triggered by workflow_dispatch | |
if [ -z "$tag" ]; then | |
tag=${GITHUB_REF#refs/tags/} | |
fi | |
git tag -f -a -m "$tag" "$tag" | |
git push -f origin "$tag" | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |