-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
4 changed files
with
173 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
time: "08:00" | ||
timezone: "Europe/Paris" | ||
labels: | ||
- ":game_die: dependencies" | ||
- ":robot: bot" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
time: "08:00" | ||
timezone: "Europe/Paris" | ||
labels: | ||
- ":game_die: dependencies" | ||
- ":robot: bot" |
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,74 @@ | ||
name: build | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15 | ||
- | ||
name: Config | ||
run: | | ||
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | ||
echo "$(go env GOPATH)/bin/windows_386" >> $GITHUB_PATH | ||
echo "PORTAPPS_VERSION=$(cat go.mod | grep github.com/portapps/portapps | awk '{print $NF}')" >> $GITHUB_ENV | ||
echo "PORTAPPS_DIR=./.portapps" >> $GITHUB_ENV | ||
if [[ $GITHUB_REF == refs/tags/* ]]; then | ||
echo "GIT_TAGNAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | ||
fi | ||
shell: bash | ||
- | ||
name: Checkout core | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: portapps/portapps | ||
ref: ${{ env.PORTAPPS_VERSION }} | ||
path: ${{ env.PORTAPPS_DIR }} | ||
- | ||
name: Cache Go modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- | ||
name: Build | ||
run: | | ||
ant release -Dcore.dir=${{ env.PORTAPPS_DIR }} | ||
shell: bash | ||
- | ||
name: Upload assets | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ github.event.repository.name }} | ||
path: bin/release/* | ||
- | ||
name: GitHub Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
draft: true | ||
files: | | ||
bin/release/* | ||
name: ${{ env.GIT_TAGNAME }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
name: Dump context | ||
if: always() | ||
uses: crazy-max/ghaction-dump-context@v1 |
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,44 @@ | ||
name: gosum | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
paths: | ||
- '.github/workflows/gosum.yml' | ||
- 'go.mod' | ||
- 'go.sum' | ||
|
||
jobs: | ||
fix: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.13 | ||
- | ||
name: Tidy | ||
run: | | ||
rm -f go.sum | ||
go mod tidy | ||
- | ||
name: Set up Git | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config user.name GitHub | ||
git config user.email noreply@github.com | ||
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | ||
- | ||
name: Commit and push changes | ||
run: | | ||
git add . | ||
if output=$(git status --porcelain) && [ ! -z "$output" ]; then | ||
git commit --author "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" --message "Fix go modules" | ||
git push | ||
fi |
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,35 @@ | ||
name: released | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
virustotal: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Prepare | ||
id: prepare | ||
run: | | ||
echo ::set-output name=date::$(date -u +'%Y%m%d') | ||
- | ||
name: VirusTotal Monitor Scan | ||
uses: crazy-max/ghaction-virustotal@v2 | ||
with: | ||
vt_api_key: ${{ secrets.VT_MONITOR_API_KEY }} | ||
vt_monitor: true | ||
monitor_path: /portapps/${{ steps.prepare.outputs.date }}/${{ github.event.repository.name }}-${{ github.event.release.tag_name }} | ||
update_release_body: false | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
files: | | ||
${{ github.event.repository.name }}-(win32|win64).exe | ||
- | ||
name: VirusTotal Scan | ||
uses: crazy-max/ghaction-virustotal@v2 | ||
with: | ||
vt_api_key: ${{ secrets.VT_API_KEY }} | ||
update_release_body: true | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
files: | | ||
${{ github.event.repository.name }}-(win32|win64).exe |