Skip to content

build(deps): bump modernc.org/sqlite from 1.29.3 to 1.29.5 #573

build(deps): bump modernc.org/sqlite from 1.29.3 to 1.29.5

build(deps): bump modernc.org/sqlite from 1.29.3 to 1.29.5 #573

Workflow file for this run

on: [push]
permissions:
contents: write
pull-requests: write
jobs:
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.19'
- run: go test ./...
env:
TZ: America/Los_Angeles
build:
strategy:
matrix:
cur:
- {GOOS: linux, GOARCH: amd64, outfile: leatherman.xz}
- {GOOS: linux, GOARCH: arm, outfile: leatherman.arm.xz}
- {GOOS: darwin, GOARCH: amd64, outfile: leatherman.mac.xz}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.19'
- run: go build -o leatherman
env:
GOOS: ${{ matrix.cur.GOOS }}
GOARCH: ${{ matrix.cur.GOARCH }}
- run: xz --stdout leatherman > ${{ matrix.cur.outfile}}
- uses: actions/upload-artifact@master
with:
name: ${{ matrix.cur.outfile }}
path: ${{ matrix.cur.outfile }}
build-windows:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.19'
- run: go build -o leatherman.exe
env:
GOOS: windows
GOARCH: amd64
- run: zip leatherman-windows.zip leatherman.exe
- uses: actions/upload-artifact@master
with:
name: leatherman-windows.zip
path: leatherman-windows.zip
dependabot:
runs-on: ubuntu-latest
# Only run this job for dependabot PRs
if: ${{ github.actor == 'dependabot[bot]' }}
# Only run if the required checks pass
needs: [test, build, build-windows]
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Auto-merge Dependabot PRs
# Find the PR number based on the current branch name, and squash merge based on this number
run: 'PR_NUM="$(gh pr list | grep $(git branch --show-current) | cut -f1)"; gh pr merge --auto --squash $PR_NUM'
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
release:
needs: [test, build, build-windows]
runs-on: ubuntu-20.04
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url}}
steps:
- uses: anothrNick/github-tag-action@1.17.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CUSTOM_TAG: untagged-${{ github.sha }}
- id: create_release
uses: actions/create-release@v1
if: github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: untagged-${{ github.sha }}
release_name: Release ${{ github.sha }}
upload:
needs: [release]
strategy:
matrix:
file: ['leatherman.xz', 'leatherman-windows.zip', 'leatherman.arm.xz', 'leatherman.mac.xz']
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@master
with:
name: ${{ matrix.file }}
path: .
- uses: actions/upload-release-asset@v1
if: github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ./${{ matrix.file }}
asset_name: ${{ matrix.file }}
asset_content_type: application/x-xz