From 38961bff4085546a4b0e7770218b933ddffa523e Mon Sep 17 00:00:00 2001 From: Harry Pierson Date: Fri, 2 Feb 2024 12:55:14 -0800 Subject: [PATCH] add GH workflows --- .github/workflows/build.yml | 46 +++++++++++++++++++++++++++++++++++ .github/workflows/on_pr.yml | 17 +++++++++++++ .github/workflows/on_push.yml | 13 ++++++++++ 3 files changed, 76 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/on_pr.yml create mode 100644 .github/workflows/on_push.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..14c1488 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,46 @@ +name: Build + +on: + workflow_call: + outputs: + public-release: + description: "A boolean value indicating whether this build is recognized as building from a public release branch" + value: ${{ jobs.build.outputs.public-release }} + sem-ver-1: + description: "The SemVer 1.0 compliant version" + value: ${{ jobs.build.outputs.sem-ver-1 }} + sem-ver-2: + description: "The SemVer 2.0 compliant version" + value: ${{ jobs.build.outputs.sem-ver-2 }} + simple-ver: + description: "The three integer version" + value: ${{ jobs.build.outputs.version }} + version: + description: "The four integer version" + value: ${{ jobs.build.outputs.version }} + +jobs: + build: + runs-on: ubuntu-latest + outputs: + # convert PublicRelease to a boolean by comparing the string value to 'true' + public-release: ${{ steps.nbgv.outputs.PublicRelease == 'true' }} + sem-ver-1: ${{ steps.nbgv.outputs.SemVer1 }} + sem-ver-2: ${{ steps.nbgv.outputs.SemVer2 }} + simple-ver: ${{ steps.nbgv.outputs.SimpleVersion }} + version: ${{ steps.nbgv.outputs.Version }} + steps: + - name: Checkout + uses: actions/checkout@v4.1.0 + with: + fetch-depth: 0 # fetch-depth 0 needed for NBGV + - name: Nerdbank.GitVersioning + uses: dotnet/nbgv@v0.4.2 + id: nbgv + - name: Pack Extension + run: npx vsce pack ${{ steps.nbgv.outputs.SemVer1 }} + - name: Upload Extension Artifact + uses: actions/upload-artifact@v4.3.0 + with: + name: Extension + path: dbos-ttdbg*.vsix diff --git a/.github/workflows/on_pr.yml b/.github/workflows/on_pr.yml new file mode 100644 index 0000000..aaec97d --- /dev/null +++ b/.github/workflows/on_pr.yml @@ -0,0 +1,17 @@ +name: On Pull Request + +on: + pull_request: + branches: + - main + - dev + - release/* + types: + - ready_for_review + - opened + - reopened + - synchronize + +jobs: + build: + uses: ./.github/workflows/build.yml diff --git a/.github/workflows/on_push.yml b/.github/workflows/on_push.yml new file mode 100644 index 0000000..2950da2 --- /dev/null +++ b/.github/workflows/on_push.yml @@ -0,0 +1,13 @@ +name: On Push + +on: + push: + branches: + - main + - dev + - release/* + +jobs: + build: + uses: ./.github/workflows/build.yml + \ No newline at end of file