From fec038fc5c53bbf13c007c50a4a885f5db21e50a Mon Sep 17 00:00:00 2001 From: Guilherme Branco Stracini Date: Fri, 7 Mar 2025 10:36:10 +0000 Subject: [PATCH] Create ci.yml --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b9aa5ce --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,53 @@ +name: CI + +on: + push: + branches: [main] + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-tests: + name: Build and Test + runs-on: ubuntu-latest + outputs: + semVer: ${{ steps.gitversion.outputs.semVer }} + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install GitVersion + uses: gittools/actions/gitversion/setup@v3 + with: + versionSpec: '5.x' + + - name: Determine Version + id: gitversion + uses: gittools/actions/gitversion/execute@v3 + with: + useConfigFile: true + + create_release: + name: Create release + needs: [build-tests] + env: + SEMVER: ${{ needs.build-tests.outputs.semVer }} + runs-on: ubuntu-latest + + steps: + - name: Create Release + uses: ncipollo/release-action@v1.16.0 + with: + skipIfReleaseExists: true + allowUpdates: false + draft: false + makeLatest: true + tag: v${{ env.SEMVER }} + name: Release v${{ env.SEMVER }} + generateReleaseNotes: true + body: Release ${{ env.SEMVER }} of ${{ github.repository }}