Skip to content

Commit

Permalink
ci: add release please bot (#422)
Browse files Browse the repository at this point in the history
* ci: add release-please github action

* ci: update release-please config
  • Loading branch information
calebkiage committed Feb 5, 2024
1 parent 1ed2d86 commit f5eb478
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 19 deletions.
15 changes: 5 additions & 10 deletions .azure-pipelines/release-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -668,24 +668,19 @@ stages:
- task: DownloadPipelineArtifact@2
inputs:
path: $(artifactsDownloadLocation)
- pwsh: |
$isPreview = '$(branchOrTagName)'.Contains("preview")
Write-Host "##vso[task.setvariable variable=IS_PREVIEW]$isPreview"
- task: GithubRelease@1
displayName: 'Create GitHub Draft Release'
displayName: 'Upload Artifacts to GitHub Release'
inputs:
gitHubConnection: $(repositoryConnection)
repositoryName: '$(Build.Repository.Name)'
action: create
tagSource: 'gitTag'
isDraft: true
addChangeLog: true
changeLogCompareToRelease: lastNonDraftRelease
action: edit
tag: $(branchOrTagName)
addChangeLog: false
assetUploadMode: replace
assets: |
$(artifactsDownloadLocation)/build-output-linux-*/*.tar*
$(artifactsDownloadLocation)/sign-output-*/*.tar*
$(artifactsDownloadLocation)/sign-output-*/*.zip
isPreRelease: $(IS_PREVIEW)
- deployment: deployNuget
displayName: Deploy Nuget
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
target-branch: main
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.2.0"
}
9 changes: 0 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

### Changed

## [1.2.0] - 2024-01-22

### Added
Expand Down
32 changes: 32 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"bootstrap-sha": "c4f91f1e8107dc09feb611174308ea6f5618874b",
"exclude-paths": [
".azure-pipelines",
".devcontainer",
".idea",
".github",
".vs",
".vscode"
],
"release-type": "simple",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"include-component-in-tag": false,
"include-v-in-tag": true,
"draft": false,
"prerelease": false,
"packages": {
".": {
"package-name": "msgraph-cli",
"changelog-path": "CHANGELOG.md",
"extra-files": [
{
"type": "xml",
"path": "src/msgraph-cli.csproj",
"xpath": "//Project/PropertyGroup/Version"
}
]
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}

0 comments on commit f5eb478

Please sign in to comment.