Skip to content

Commit

Permalink
add GH workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
devhawk committed Feb 2, 2024
1 parent 7797072 commit 38961bf
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions .github/workflows/on_pr.yml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions .github/workflows/on_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: On Push

on:
push:
branches:
- main
- dev
- release/*

jobs:
build:
uses: ./.github/workflows/build.yml

0 comments on commit 38961bf

Please sign in to comment.