-
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.
Merge pull request #1 from EIYARO/ci-cd
Adding CI/CD
- Loading branch information
Showing
1 changed file
with
64 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,64 @@ | ||
name: EIYARO Main Workflow | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
|
||
push: | ||
branches: [ main ] | ||
tags: [ "*" ] | ||
paths-ignore: [ "README.md", "CHANGELOG.md", "cliff.toml" ] | ||
|
||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
|
||
build: | ||
name: Build Applications | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkput | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.22' | ||
|
||
- name: Build Server | ||
run: make eiyarod | ||
|
||
- name: Build Client | ||
run: make eiyarocli | ||
|
||
release: | ||
if: contains(github.ref_type, 'tag') | ||
name: Create GitHub Release | ||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
submodules: true | ||
|
||
- name: Build Release | ||
run: make release-all | ||
|
||
- name: Create GitHub release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: EIYARO ${{ env.tag }} | ||
body: "## New release" | ||
files: target/* | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |