Skip to content

Merge remote-tracking branch 'origin/dependabot/go_modules/github.com… #30

Merge remote-tracking branch 'origin/dependabot/go_modules/github.com…

Merge remote-tracking branch 'origin/dependabot/go_modules/github.com… #30

Workflow file for this run

name: Create release from tag
on:
push:
tags:
- 'v*'
jobs:
create-release:
name: Create release
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
needs: create-release
strategy:
matrix:
goos: [linux]
goarch: ["386", amd64, arm, arm64]
steps:
- name: Set up Go 1.20
uses: actions/setup-go@v1
with:
go-version: 1.20
- uses: actions/checkout@v2
- name: Build artifact
run: |
go build -o coredns example/main.go
zip "coredns-with-blocklist-${{ matrix.goos }}-${{ matrix.goarch }}" coredns
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./coredns-with-blocklist-${{ matrix.goos }}-${{ matrix.goarch }}.zip
asset_name: coredns-with-blocklist-${{ matrix.goos }}-${{ matrix.goarch }}.zip
asset_content_type: application/zip