Skip to content

Merge pull request #31 from iselt/master #29

Merge pull request #31 from iselt/master

Merge pull request #31 from iselt/master #29

Workflow file for this run

name: Build and Release
on:
push:
branches:
- 'master'
tags:
- '*'
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.20.0'
- name: Build
run: |
chmod u+x build.sh
echo "tag=${GITHUB_REF_NAME}" >> $GITHUB_ENV
./build.sh
# debug
- run: echo tag is ${{ env.tag }}
- name: Create Release
id: create_release
uses: actions/[email protected]
with:
draft: false
prerelease: false
release_name: ${{ env.tag }}
tag_name: ${{ env.tag }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload macOS Binary
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/dnslog-macos.zip
asset_name: dnslog-macos.zip
asset_content_type: application/octet-stream
- name: Upload Linux Binary
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/dnslog-linux.zip
asset_name: dnslog-linux.zip
asset_content_type: application/octet-stream
- name: Upload Windows Binary
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/dnslog-windows.zip
asset_name: dnslog-windows.zip
asset_content_type: application/octet-stream