-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
88 additions
and
38 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
name: build | ||
|
||
on: | ||
|
@@ -6,41 +7,54 @@ on: | |
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Make github config | ||
run: curl -sL https://raw.githubusercontent.com/triole/ghwfe/master/sh/make_github_config.sh | bash | ||
- | ||
name: Install Go | ||
env: | ||
TARGET_FOLDER: /home/runner/.local/go | ||
run: curl -sL https://raw.githubusercontent.com/triole/ghwfe/master/sh/go_install.sh | bash | ||
- | ||
name: Build | ||
env: | ||
GOROOT: /home/runner/.local/go | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
APP_NAME: ee | ||
SOURCE_FOLDER: src | ||
# TARGET_FOLDER: build | ||
run: curl -sL https://raw.githubusercontent.com/triole/ghwfe/master/sh/go_build.sh | bash | ||
- | ||
name: Gzip assets | ||
env: | ||
SOURCE_FOLDER: build | ||
# VERSION_COMMAND: date +%y.%m.%d | ||
run: curl -sL https://raw.githubusercontent.com/triole/ghwfe/master/sh/gzip_builds.sh | bash | ||
- | ||
name: Upload release binaries | ||
uses: alexellis/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
asset_paths: '["/tmp/assets/*"]' | ||
test: | ||
uses: ./.github/workflows/test.yaml | ||
permissions: write-all | ||
release: | ||
needs: | ||
- test | ||
name: make release | ||
permissions: write-all | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Make github config | ||
run: curl -sL https://raw.githubusercontent.com/triole/ghwfe/master/sh/make_github_config.sh | ||
| bash | ||
- name: Install Go | ||
env: | ||
TARGET_FOLDER: /home/runner/.local/go | ||
run: curl -sL https://raw.githubusercontent.com/triole/ghwfe/master/sh/go_install.sh | ||
| bash | ||
- name: Add packages in sub folders to GOROOT | ||
env: | ||
GOROOT: /home/runner/.local/go | ||
SOURCE_FOLDER: src | ||
run: curl -sL https://raw.githubusercontent.com/triole/ghwfe/master/sh/go_add_sub_packages.sh | ||
| bash | ||
- name: Build | ||
env: | ||
GOROOT: /home/runner/.local/go | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
APP_NAME: ee | ||
SOURCE_FOLDER: src | ||
# TARGET_FOLDER: build | ||
run: curl -sL https://raw.githubusercontent.com/triole/ghwfe/master/sh/go_build.sh | ||
| bash | ||
- name: Gzip assets | ||
# env: | ||
# SOURCE_FOLDER: build | ||
# TARGET_FOLDER: /tmp/assets | ||
# VERSION_COMMAND: date +%y.%m.%d | ||
run: curl -sL https://raw.githubusercontent.com/triole/ghwfe/master/sh/gzip_builds.sh | ||
| bash | ||
- if: ${{ !env.ACT }} | ||
name: Upload release binaries | ||
uses: alexellis/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
asset_paths: '["/tmp/assets/*"]' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
name: test | ||
|
||
on: | ||
push: | ||
branches: ["master"] | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
jobs: | ||
test: | ||
name: go test | ||
permissions: write-all | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Go | ||
env: | ||
TARGET_FOLDER: /home/runner/.local/go | ||
run: curl -sL https://raw.githubusercontent.com/triole/ghwfe/master/sh/go_install.sh | ||
| bash | ||
- name: Add packages in sub folders to GOROOT | ||
env: | ||
GOROOT: /home/runner/.local/go | ||
SOURCE_FOLDER: src | ||
run: curl -sL https://raw.githubusercontent.com/triole/ghwfe/master/sh/go_add_sub_packages.sh | ||
| bash | ||
- name: run tests | ||
env: | ||
GOROOT: /home/runner/.local/go | ||
SOURCE_FOLDER: src | ||
run: curl -sL https://raw.githubusercontent.com/triole/ghwfe/master/sh/go_test.sh | ||
| bash |