148 lines
3.5 KiB
YAML
148 lines
3.5 KiB
YAML
name: Build Proxywoman
|
|
|
|
on:
|
|
push:
|
|
# branches: [ master ]
|
|
# pull_request:
|
|
# branches: [ master ]
|
|
|
|
jobs:
|
|
|
|
build-linux:
|
|
name: Linux Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install Dependencies
|
|
run: sudo apt install gcc libgtk-3-dev libappindicator3-dev libwebkit2gtk-4.0-dev
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Unshallow
|
|
run: git fetch --prune --unshallow
|
|
-
|
|
name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.14
|
|
-
|
|
name: Run Builds
|
|
run: |
|
|
rm -rf ./out
|
|
./build.sh linux server
|
|
# ./build.sh linux desktop - Linux desktop build is not currently supported.
|
|
- name: Upload Build Artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
# Artifact name
|
|
# name: # optional
|
|
path: ./out/**/*
|
|
|
|
build-darwin:
|
|
name: Darwin Build
|
|
runs-on: macos-latest
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Unshallow
|
|
run: git fetch --prune --unshallow
|
|
-
|
|
name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.14
|
|
-
|
|
name: Run Builds
|
|
run: |
|
|
rm -rf ./out
|
|
./build.sh darwin server
|
|
./build.sh darwin desktop
|
|
- name: Upload Build Artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
# Artifact name
|
|
# name: # optional
|
|
path: ./out/**/*
|
|
|
|
build-windows:
|
|
name: Windows Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Unshallow
|
|
run: git fetch --prune --unshallow
|
|
-
|
|
name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.14
|
|
-
|
|
name: Run Builds
|
|
run: |
|
|
rm -rf ./out
|
|
./build.sh windows server
|
|
./build.sh windows desktop
|
|
- name: Upload Build Artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
# Artifact name
|
|
# name: # optional
|
|
path: ./out/**/*
|
|
|
|
generate-release:
|
|
name: Execute Release
|
|
runs-on: ubuntu-latest
|
|
needs: [build-linux, build-darwin, build-windows]
|
|
steps:
|
|
-
|
|
name: Prepare Release Directory
|
|
run: mkdir ./release
|
|
-
|
|
name: Download a Build Artifact
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
# Destination path
|
|
path: ./release # optional
|
|
-
|
|
name: Load version information
|
|
run: |
|
|
source ${{ github.workspace }}/version.properties
|
|
echo "::set-env name=VERSION_NAME::$VERSION_NAME"
|
|
echo "::set-env name=VERSION_CODE::$VERSION_CODE"
|
|
-
|
|
name: Display structure of downloaded files
|
|
working-directory: ./release
|
|
run: |
|
|
ls -R
|
|
-
|
|
name: Create a Release
|
|
id: create_release
|
|
uses: actions/create-release@v1
|
|
with:
|
|
# The name of the tag. This should come from the webhook payload, `github.GITHUB_REF` when a user pushes a new tag
|
|
tag_name: ${{ github.GITHUB_REF }}
|
|
# The name of the release. For example, `Release v1.0.1`
|
|
release_name: Release v$VERSION_NAME
|
|
# Text describing the contents of the tag.
|
|
body: ""
|
|
draft: false
|
|
prerelease: false
|
|
-
|
|
name: Upload Release Asset
|
|
id: upload_release_assets
|
|
uses: NBTX/upload-release-assets@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
targets: "./release/artifact/**/*"
|
|
|
|
|
|
|
|
|
|
|