fix: docker image should use the 0.0.0.0 host instead of localhost #47
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Proxyscotch | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build-linux: | |
name: Linux Build | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install Dependencies | |
run: | | |
sudo apt update | |
sudo apt install gcc libgtk-3-dev libappindicator3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-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.18 | |
- name: Run Builds | |
run: | | |
rm -rf ./out | |
./build.sh linux server arch=amd64 | |
./build.sh linux server arch=arm64 | |
./build.sh linux desktop | |
- name: Upload Build Artifact | |
uses: actions/upload-artifact@v4 | |
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.18 | |
- name: Run Builds | |
run: | | |
rm -rf ./out | |
./build.sh darwin server | |
./build.sh darwin desktop | |
- name: Upload Build Artifact | |
uses: actions/upload-artifact@v4 | |
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.18 | |
- name: Run Builds | |
run: | | |
rm -rf ./out | |
./build.sh windows server | |
./build.sh windows desktop | |
- name: Upload Build Artifact | |
uses: actions/upload-artifact@v4 | |
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: Checkout | |
uses: actions/checkout@v2 | |
- name: Unshallow | |
run: git fetch --prune --unshallow | |
- 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 ./version.properties | |
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV | |
echo "VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV | |
# 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 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
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: "v${{ env.VERSION_NAME }}" | |
# The name of the release. For example, `Release v1.0.1` | |
release_name: "Release v${{ env.VERSION_NAME }}" | |
# Text describing the contents of the tag. | |
body: "" | |
draft: false | |
prerelease: false | |
- name: Upload Windows Release Assets | |
id: upload_release_assets_windows | |
uses: NBTX/upload-release-assets@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
targets: "./release/artifact/windows-*/*.exe" | |
- name: Upload Linux Release Assets | |
id: upload_release_assets_linux | |
uses: NBTX/upload-release-assets@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
targets: "./release/artifact/linux-*/*.!(md)" | |
- name: Upload macOS Server Release Assets | |
id: upload_release_assets_darwin_server | |
uses: NBTX/upload-release-assets@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
targets: "./release/artifact/darwin-server/*.!(md)" | |
- name: Upload macOS Desktop Release Assets | |
id: upload_release_assets_darwin | |
uses: NBTX/upload-release-assets@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
targets: "./release/artifact/darwin-*/*.zip" |