-
Notifications
You must be signed in to change notification settings - Fork 0
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
8 changed files
with
102 additions
and
24 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,21 +1,29 @@ | ||
name: Build and Release binary | ||
name: Build and release binary | ||
|
||
on: | ||
schedule: | ||
- cron: "30 1 * * *" | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build-release-binary: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build Verdex binary | ||
run: | | ||
go mod download | ||
go build -ldflags "-X github.com/verdexlab/verdex/verdex/core.releaseEnvironment=release-binary" -o verdex-binary | ||
- name: Setup Go environment | ||
uses: actions/setup-go@v5 | ||
|
||
- name: Store Verdex binary | ||
run: | | ||
# TODO | ||
- name: Build and release binary | ||
uses: goreleaser/goreleaser-action@v6 | ||
with: | ||
distribution: goreleaser | ||
version: '~> v2' | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,25 @@ | ||
name: Create CLI release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
create-cli-release: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Determine release version | ||
run: echo "VERDEX_VERSION=$(awk '/cliVersion/{print $4}' verdex/core/config.go | sed -e 's/\"//g')" >> $GITHUB_ENV | ||
|
||
- name: Create tag | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git tag "v$VERDEX_VERSION" | ||
git push --tags |
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,8 +1,9 @@ | ||
name: Update Products Votes | ||
name: Update products votes | ||
|
||
on: | ||
schedule: | ||
- cron: "30 1 * * *" | ||
- cron: "30 1 * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update-products-votes: | ||
|
@@ -12,15 +13,21 @@ jobs: | |
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python environment | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Update Products Votes | ||
- name: Install dependencies | ||
run: pip install requests | ||
|
||
- name: Update products votes | ||
run: python3 scripts/update-products-votes.py | ||
|
||
- name: Git Commit & Push | ||
- name: Git commit & push | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
|
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 |
---|---|---|
|
@@ -6,3 +6,6 @@ output.json | |
# Templates Caches | ||
.versions.cache | ||
.cache | ||
|
||
# Build | ||
dist/ |
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,34 @@ | ||
version: 2 | ||
|
||
before: | ||
hooks: | ||
- go mod tidy | ||
|
||
builds: | ||
- id: verdex-cli | ||
binary: verdex | ||
|
||
env: | ||
- CGO_ENABLED=0 | ||
|
||
goos: [windows,linux,darwin] | ||
goarch: [amd64,386,arm,arm64] | ||
ignore: | ||
- goos: darwin | ||
goarch: 386 | ||
- goos: windows | ||
goarch: arm | ||
- goos: windows | ||
goarch: arm64 | ||
|
||
ldflags: | ||
- -X github.com/verdexlab/verdex/verdex/core.releaseEnvironment=release-binary | ||
|
||
archives: | ||
- format: zip | ||
id: verdex | ||
builds: [verdex-cli] | ||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ if eq .Os "darwin" }}macOS{{ else }}{{ .Os }}{{ end }}_{{ .Arch }}' | ||
|
||
checksum: | ||
algorithm: sha256 |
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
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
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