-
Notifications
You must be signed in to change notification settings - Fork 21
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
91 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,56 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build-and-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.22.1' | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.15.0' | ||
|
||
- name: Install dependencies | ||
run: | | ||
go mod download | ||
cd web && npm install | ||
cd .. | ||
make deps | ||
- name: Create Config | ||
run: cp config.example.json config.json && sed -i 's|<ENDPOINT>|dummy-endpoint|g; s|<ACCESS_KEY_ID>|dummy-access-key-id|g; s|<SECRET_ACCESS>|dummy-secret-access|g; s|<BUCKET_NAME>|dummy-bucket|g; s|<ACCOUNT_ID>|dummy-account-id|g; s|<API_KEY>|dummy-api-key|g; s|<CLIENT_ID>|dummy-client-id|g; s|<CLIENT_SECRET>|dummy-client-secret|g; s|<DIRECTORY_ID>|dummy-directory-id|g; s|<domain>|dummy-domain.com|g; s|<CALLBACK_URL>|dummy-callback-url|g' config.json | ||
|
||
- name: Build for all platforms | ||
run: make build | ||
|
||
- name: Upload release assets | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist/ | ||
|
||
- name: Create GitHub Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
dist/kalmia_${{ github.ref_name }}_linux_amd64 | ||
dist/kalmia_${{ github.ref_name }}_linux_arm64 | ||
dist/kalmia_${{ github.ref_name }}_win64.exe | ||
dist/kalmia_${{ github.ref_name }}_freebsd64 | ||
dist/kalmia_${{ github.ref_name }}_macos64 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Cleanup build artifacts | ||
run: make clean |
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: Test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.22.1' | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.15.0' | ||
|
||
- name: Install dependencies | ||
run: | | ||
go mod download | ||
cd web && npm install | ||
cd .. | ||
make deps | ||
- name: Create Config | ||
run: cp config.example.json config.json && sed -i 's|<ENDPOINT>|dummy-endpoint|g; s|<ACCESS_KEY_ID>|dummy-access-key-id|g; s|<SECRET_ACCESS>|dummy-secret-access|g; s|<BUCKET_NAME>|dummy-bucket|g; s|<ACCOUNT_ID>|dummy-account-id|g; s|<API_KEY>|dummy-api-key|g; s|<CLIENT_ID>|dummy-client-id|g; s|<CLIENT_SECRET>|dummy-client-secret|g; s|<DIRECTORY_ID>|dummy-directory-id|g; s|<domain>|dummy-domain.com|g; s|<CALLBACK_URL>|dummy-callback-url|g' config.json | ||
|
||
- name: Run tests | ||
run: make test |