Skip to content

Merge pull request #151 from yuk7/dependabot/go_modules/src/github.co… #16

Merge pull request #151 from yuk7/dependabot/go_modules/src/github.co…

Merge pull request #151 from yuk7/dependabot/go_modules/src/github.co… #16

Workflow file for this run

name: Continuous Deployment
on:
push:
tags:
- '*'
jobs:
publish-github:
name: Publish on Github
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: |
$Env:PATH = "${Env:USERPROFILE}\go\bin;${Env:PATH}"
$version = ${Env:GITHUB_REF}.Replace("refs/tags/","")
$Env:GO_BUILD_OPTS = "-ldflags `"-w -s -X github.com/yuk7/wsldl/version.version=${version}`""
$Env:PATH = "${Env:USERPROFILE}\go\bin;${Env:PATH}"
echo AMD64 build
.\build.bat all
move out out_amd64
echo ARM64 build
$Env:GOARCH="arm64"
.\build.bat all
move out out_arm64
- name: Zip package and rename
run: |
Compress-Archive -Path .\out_amd64\icons\* -DestinationPath .\out_amd64\icons.zip
move .\out_arm64\wsldl.exe .\out_arm64\wsldl_arm64.exe
Compress-Archive -Path .\out_arm64\icons\* -DestinationPath .\out_arm64\icons_arm64.zip
- name: Release body
run: |
$version = ${Env:GITHUB_REF}.Replace("refs/tags/","")
echo "![downloads](https://img.shields.io/github/downloads/yuk7/wsldl/${version}/total?style=flat-square)" > body.txt
- name: Upload the release
uses: softprops/action-gh-release@v1
with:
body_path: body.txt
files: |
out_amd64/wsldl.exe
out_amd64/icons.zip
out_arm64/wsldl_arm64.exe
out_arm64/icons_arm64.zip
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}