Skip to content

build(deps): bump cloud.google.com/go/cloudsqlconn from 1.12.0 to 1.13.1 #1262

build(deps): bump cloud.google.com/go/cloudsqlconn from 1.12.0 to 1.13.1

build(deps): bump cloud.google.com/go/cloudsqlconn from 1.12.0 to 1.13.1 #1262

Workflow file for this run

name: Publish release
on:
push:
paths-ignore:
- "**.md"
- "doc/**"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
set-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.set-version.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: set version
id: set-version
run: |
echo Faking a Semantic Version
echo "version=1.$(date "+%Y%m%d%H%M%S")" >> ${GITHUB_OUTPUT}
test:
needs:
- set-version
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
uses: actions/checkout@v4
- name: Extract version of Go to use
run: echo "GOVERSION=$(cat go.mod | grep -w "go" | awk ' { print $2 } ' | grep -w "^[^v]")" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v5.1.0
with:
go-version: ${{ env.GOVERSION }}
- name: Test Go
run: |
go mod tidy -v
make test-ci
make check
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
report.xml
release:
if: ${{ github.ref == 'refs/heads/main' }}
needs:
- set-version
- test
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Extract version of Go to use
run: echo "GOVERSION=$(cat go.mod | grep -w "go" | awk ' { print $2 } ' | grep -w "^[^v]")" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v5.1.0
with:
go-version: ${{ env.GOVERSION }}
- name: Create tag
run: |
git tag ${{ needs.set-version.outputs.version }}
- name: Prepare for signing windows binaries
run: |
sudo apt-get update
sudo apt-get install --yes osslsigncode
echo "${{ secrets.SIGN_CERT }}" > nais.crt
echo "${{ secrets.SIGN_KEY }}" > nais.key
- uses: navikt/github-app-token-generator@v1
id: get-homebrew-token
with:
private-key: "${{ secrets.NAIS_APP_PRIVATE_KEY }}"
app-id: "${{ secrets.NAIS_APP_ID }}"
repo: nais/homebrew-tap
- uses: navikt/github-app-token-generator@v1
id: get-scoop-token
with:
private-key: "${{ secrets.NAIS_APP_PRIVATE_KEY }}"
app-id: "${{ secrets.NAIS_APP_ID }}"
repo: nais/scoop-bucket
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: v2.3.2
args: release --config .goreleaser.yml --clean --verbose
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_PUSH_TOKEN: ${{ steps.get-homebrew-token.outputs.token }}
SCOOP_PUSH_TOKEN: ${{ steps.get-scoop-token.outputs.token }}
upload-gar:
if: ${{ github.ref == 'refs/heads/main' }}
needs:
- set-version
- release
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- id: "auth"
name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v2.1.7"
with:
workload_identity_provider: ${{ secrets.NAIS_IO_WORKLOAD_IDENTITY_PROVIDER }}
service_account: "gh-cli@nais-io.iam.gserviceaccount.com"
token_format: "access_token"
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v2"
with:
install_components: beta
- name: "Upload new deb file to Google repository"
env:
VERSION: ${{ needs.set-version.outputs.version }}
run: |
echo "Version ${VERSION} was released, adding to PPA"
# Fetch latest deb
wget https://github.com/${{ github.repository }}/releases/download/${VERSION}/nais_${VERSION}.deb
# Upload to GAR
gcloud --project nais-io beta artifacts apt upload nais-ppa --quiet --source nais_${VERSION}.deb --location europe-north1