From 6f67049b68f73fd3db2a6a01fed4a139443f3dc1 Mon Sep 17 00:00:00 2001 From: vunb Date: Tue, 5 Nov 2024 09:58:38 +0700 Subject: [PATCH] Add GA --- .github/pull_request_template.md | 21 ++++++++++++ .github/workflows/linux-build.yml | 51 +++++++++++++++++++++++++++++ .github/workflows/windows-build.yml | 45 +++++++++++++++++++++++++ .gitignore | 2 ++ 4 files changed, 119 insertions(+) create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/linux-build.yml create mode 100644 .github/workflows/windows-build.yml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..de12c33 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,21 @@ +# Description + +Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. + +Fixes # (issue) + +## Type of change + +Please delete options that are not relevant. + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] This change requires a documentation update + +# Checklist: + +- [ ] I have performed a self-review of my own code +- [ ] I have made corresponding changes to the documentation +- [ ] My changes generate no new warnings +- [ ] I have run tests (npm run test & npm run e2e) that prove my fix is effective or that my feature works diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml new file mode 100644 index 0000000..27427e2 --- /dev/null +++ b/.github/workflows/linux-build.yml @@ -0,0 +1,51 @@ +# This is a basic workflow to help you get started with Actions +name: "Linux Build" + +# Controls when the action will run. +on: [push] + +# on: + # Triggers the workflow on release + # The tag will be under github.event.release.tag_name, + # the release under github.event.release.name + # release: + # types: [published] + + # Allows you to run this workflow manually from the Actions tab + # workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +permissions: + contents: read + +jobs: + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + strategy: + matrix: + dotnet-version: ['8.0.x'] + + steps: + - uses: actions/checkout@v4 + - name: Setup dotnet ${{ matrix.dotnet-version }} + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ matrix.dotnet-version }} + - name: Display dotnet version + run: dotnet --version + - name: Install dependencies + run: dotnet restore + - name: Build + run: dotnet build + - name: Test + run: dotnet test + - name: Publish + run: dotnet publish CloudSync -r linux-x64 -c Release -o Dist + - name: Upload + if: github.event_name == 'release' && github.event.action == 'published' + uses: actions/upload-artifact@v4 + with: + name: release-linux-${{ github.ref_name }} + path: Dist + diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml new file mode 100644 index 0000000..ca2dcb0 --- /dev/null +++ b/.github/workflows/windows-build.yml @@ -0,0 +1,45 @@ +# This is a basic workflow to help you get started with Actions +name: "Windows Build" + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the master branch + # push: + # branches: + # - master + # pull_request: + # branches: + # - master + release: + types: [published] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +permissions: + contents: read + +jobs: + build: + # The type of runner that the job will run on + runs-on: windows-latest + strategy: + matrix: + dotnet-version: ['8.0.x'] + steps: + - uses: actions/checkout@v4 + - name: Setup dotnet ${{ matrix.dotnet-version }} + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ matrix.dotnet-version }} + - name: Display dotnet version + run: dotnet --version + - name: Install dependencies + run: dotnet restore + - name: Build + run: dotnet build + - name: Test + run: dotnet test + - name: Publish + run: dotnet publish CloudSync -r win-x64 -c Release -o Dist \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2c3b0a2..2b9049c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs +Dist +CloudSyncDist # Build results [Dd]ebug/