build(deps): bump github.com/yuin/gopher-lua from 1.1.0 to 1.1.1 #563
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
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/[email protected] | |
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 |