Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 528f348

Browse files
authored
ci: add release bot (#45)
Cleanup workflows
1 parent bd0e3aa commit 528f348

File tree

6 files changed

+65
-67
lines changed

6 files changed

+65
-67
lines changed

.azure-pipelines/release-cli.yaml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pool:
1717
vmImage: ubuntu-latest
1818

1919
variables:
20+
- group: ESRP
2021
- name: repositoryConnection
2122
value: 'GitHub - calebkiage'
2223
- name: fileNameTemplate
@@ -505,6 +506,7 @@ stages:
505506
zipName: $(ZIP_NAME)
506507
targetRuntime: $(rid)
507508
enabled: $(IS_MACOS)
509+
certificateName: $(CERTIFICATE_ID)
508510

509511
- pwsh: |
510512
Write-Host "##vso[task.setvariable variable=ESRP_FILE_PATTERN]$(ZIP_NAME)"
@@ -668,24 +670,19 @@ stages:
668670
- task: DownloadPipelineArtifact@2
669671
inputs:
670672
path: $(artifactsDownloadLocation)
671-
- pwsh: |
672-
$isPreview = '$(branchOrTagName)'.Contains("preview")
673-
Write-Host "##vso[task.setvariable variable=IS_PREVIEW]$isPreview"
674673
- task: GithubRelease@1
675-
displayName: 'Create GitHub Draft Release'
674+
displayName: 'Upload Artifacts to GitHub Release'
676675
inputs:
677676
gitHubConnection: $(repositoryConnection)
678677
repositoryName: '$(Build.Repository.Name)'
679-
action: create
680-
tagSource: 'gitTag'
681-
isDraft: true
682-
addChangeLog: true
683-
changeLogCompareToRelease: lastNonDraftRelease
678+
action: edit
679+
tag: $(branchOrTagName)
680+
addChangeLog: false
681+
assetUploadMode: replace
684682
assets: |
685683
$(artifactsDownloadLocation)/build-output-linux-*/*.tar*
686684
$(artifactsDownloadLocation)/sign-output-*/*.tar*
687685
$(artifactsDownloadLocation)/sign-output-*/*.zip
688-
isPreRelease: $(IS_PREVIEW)
689686
690687
- deployment: deployNuget
691688
displayName: Deploy Nuget

.github/workflows/create-v1.0-pull-request.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/workflows/docker-publish.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,20 @@ jobs:
3131
submodules: true
3232
ref: ${{github.event.inputs.tag || ''}}
3333
- name: Login to docker registry
34-
uses: docker/[email protected]
34+
uses: docker/[email protected]
3535
with:
3636
username: ${{ github.actor }}
37-
password: ${{ secrets.GITHUB_TOKEN }}
37+
password: ${{ secrets.DOCKER_PUBLISH_TOKEN }}
3838
registry: ${{ env.REGISTRY }}
3939
- name: Push to GitHub Packages - Nightly
4040
if: github.ref == 'refs/heads/main' || github.event.inputs.tag == 'main'
4141
uses: docker/[email protected]
4242
with:
4343
push: true
4444
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly
45-
secrets: |
46-
"user=${{ secrets.NUGET_USER }}"
47-
"token=${{ secrets.NUGET_PASSWORD }}"
4845
- name: Push to GitHub Packages - Release
4946
if: startsWith(github.ref, 'refs/tags/v') || startsWith(github.event.inputs.tag, 'v')
5047
uses: docker/[email protected]
5148
with:
5249
push: true
5350
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.get-version.outputs.version }}
54-
secrets: |
55-
"user=${{ secrets.NUGET_USER }}"
56-
"token=${{ secrets.NUGET_PASSWORD }}"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
10+
name: release-please
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: google-github-actions/release-please-action@v4
17+
with:
18+
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
19+
config-file: release-please-config.json
20+
manifest-file: .release-please-manifest.json
21+
target-branch: main

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.2.0"
3+
}

release-please-config.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"bootstrap-sha": "bd0e3aa31d3d59dae9dfe6bb788e01aa72ffe328",
3+
"exclude-paths": [
4+
".azure-pipelines",
5+
".devcontainer",
6+
".idea",
7+
".github",
8+
".vs",
9+
".vscode"
10+
],
11+
"release-type": "simple",
12+
"bump-minor-pre-major": true,
13+
"bump-patch-for-minor-pre-major": true,
14+
"include-component-in-tag": false,
15+
"include-v-in-tag": true,
16+
"draft": false,
17+
"prerelease": true,
18+
"packages": {
19+
".": {
20+
"package-name": "msgraph-beta-cli",
21+
"changelog-path": "CHANGELOG.md",
22+
"extra-files": [
23+
{
24+
"type": "xml",
25+
"path": "src/msgraph-beta-cli.csproj",
26+
"xpath": "//Project/PropertyGroup/Version"
27+
}
28+
]
29+
}
30+
},
31+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
32+
}

0 commit comments

Comments
 (0)