Skip to content

Commit

Permalink
deploy: update release action.
Browse files Browse the repository at this point in the history
  • Loading branch information
moonD4rk authored Dec 13, 2021
1 parent 3e6ecfb commit 38a40cb
Showing 1 changed file with 43 additions and 42 deletions.
85 changes: 43 additions & 42 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Build Hack-Browser-Data Release
name: Release HackBrowserData
on:
release:
types: [created]
push:
branches:
- master

jobs:
build:
Expand All @@ -24,40 +25,39 @@ jobs:
go_version: ${{ matrix.go_version }}
dest: build
prefix: hack-browser-data
# targets: windows/amd64,windows/386,linux/386,linux/amd64,linux/arm,linux/arm64,darwin/amd64
targets: windows/amd64,windows/386,darwin/amd64,linux/arm
targets: windows/amd64,windows/386,linux/386,linux/amd64,linux/arm,linux/arm64,darwin/amd64
# targets: windows/amd64,windows/386,darwin/amd64,linux/arm
v: true
x: false
race: false
ldflags: -s -w
buildmode: default
buildmode: default

- name: Set Variable
run: |
echo "RELEASE_WIN32=hack-browser-data-${{ github.event.release.tag_name}}-windows-32bit" >> $GITHUB_ENV
echo "RELEASE_WIN64=hack-browser-data-${{ github.event.release.tag_name}}-windows-64bit" >> $GITHUB_ENV
echo "RELEASE_OSX=hack-browser-data-${{ github.event.release.tag_name}}-osx-64bit" >> $GITHUB_ENV
echo "RELEASE_LinuxARM=hack-browser-data-${{ github.event.release.tag_name}}-linux-arm" >> $GITHUB_ENV
# echo "RELEASE_Linux386=hack-browser-data-${{ github.event.release.tag_name}}-linux-386" >> $GITHUB_ENV
# echo "RELEASE_LinuxARM64=hack-browser-data-${{ github.event.release.tag_name}}-linux-arm64" >> $GITHUB_ENV
# echo "RELEASE_LinuxAMD64=hack-browser-data-${{ github.event.release.tag_name}}-linux-amd64" >> $GITHUB_ENV
echo "RELEASE_Linux386=hack-browser-data-${{ github.event.release.tag_name}}-linux-386" >> $GITHUB_ENV
echo "RELEASE_LinuxARM64=hack-browser-data-${{ github.event.release.tag_name}}-linux-arm64" >> $GITHUB_ENV
echo "RELEASE_LinuxAMD64=hack-browser-data-${{ github.event.release.tag_name}}-linux-amd64" >> $GITHUB_ENV
- name: Build zip
run: |
mv build/hack-browser-data-windows*386.exe "$RELEASE_WIN32".exe
mv build/hack-browser-data-windows*amd64.exe "$RELEASE_WIN64".exe
mv build/hack-browser-data-darwin-*amd64 "$RELEASE_OSX"
mv build/hack-browser-data-linux-*arm-* "$RELEASE_LinuxARM"
# mv build/hack-browser-data-linux-*arm64 "$RELEASE_LinuxARM64"
# mv build/hack-browser-data-linux-*386 "$RELEASE_Linux386"
# mv build/hack-browser-data-linux-*amd64 "$RELEASE_LinuxAMD64"
mv build/hack-browser-data-linux-*arm64 "$RELEASE_LinuxARM64"
mv build/hack-browser-data-linux-*386 "$RELEASE_Linux386"
mv build/hack-browser-data-linux-*amd64 "$RELEASE_LinuxAMD64"
zip "$RELEASE_WIN32".zip "$RELEASE_WIN32".exe
zip "$RELEASE_WIN64".zip "$RELEASE_WIN64".exe
zip "$RELEASE_OSX".zip "$RELEASE_OSX"
zip "$RELEASE_LinuxARM".zip "$RELEASE_LinuxARM"
echo ${{ github.ref }}
# zip "$RELEASE_Linux386".zip "$RELEASE_Linux386"
# zip "$RELEASE_LinuxAMD64".zip "$RELEASE_LinuxAMD64"
# zip "$RELEASE_LinuxARM64".zip "$RELEASE_Linux386"
zip "$RELEASE_Linux386".zip "$RELEASE_Linux386"
zip "$RELEASE_LinuxAMD64".zip "$RELEASE_LinuxAMD64"
zip "$RELEASE_LinuxARM64".zip "$RELEASE_Linux386"
- name: Create Release
Expand Down Expand Up @@ -106,31 +106,32 @@ jobs:
asset_name: ${{ env.RELEASE_LinuxARM }}.zip
asset_content_type: application/zip

# - name: Upload Release - Linux amd64
# uses: actions/[email protected]
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./${{ env.RELEASE_LinuxAMD64 }}.zip
# asset_name: ${{ env.RELEASE_LinuxAMD64 }}.zip
# asset_content_type: application/zip
- name: Upload Release - Linux amd64
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ env.RELEASE_LinuxAMD64 }}.zip
asset_name: ${{ env.RELEASE_LinuxAMD64 }}.zip
asset_content_type: application/zip

# - name: Upload Release - Linux 386
# uses: actions/[email protected]
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./${{ env.RELEASE_Linux386 }}.zip
# asset_name: ${{ env.RELEASE_Linux386 }}.zip
# asset_content_type: application/zip
- name: Upload Release - Linux 386
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ env.RELEASE_Linux386 }}.zip
asset_name: ${{ env.RELEASE_Linux386 }}.zip
asset_content_type: application/zip

# - name: Upload Release - Linux arm64
# uses: actions/[email protected]
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_name: ${{ env.RELEASE_LinuxARM64 }}.zip
# asset_content_type: application/zip
- name: Upload Release - Linux arm64
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_name: ${{ env.RELEASE_LinuxARM64 }}.zip
asset_content_type: application/zip
asset_path: ./${{ env.RELEASE_LinuxARM64 }}.zip

0 comments on commit 38a40cb

Please sign in to comment.