Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
inputs:
rel_version:
description: 'Release version (examples: 1.16.0-rc.1, 1.16.0)'
required: true
required: true
type: string

permissions: {}
Expand Down Expand Up @@ -46,4 +46,12 @@ jobs:
git config user.name "Dapr Bot"
# Update origin with token
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
./.github/scripts/create-release.sh ${{ inputs.rel_version }}
./.github/scripts/create-release.sh ${{ inputs.rel_version }}

build:
name: Build and publish CLI
needs: create-release
uses: ./.github/workflows/dapr_cli.yaml
with:
tag: v${{ inputs.rel_version }}
secrets: inherit
19 changes: 16 additions & 3 deletions .github/workflows/dapr_cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
name: dapr_cli

on:
workflow_call:
inputs:
tag:
type: string
required: true
description: 'Git tag to build and publish (e.g., v1.16.0)'
push:
branches:
- master
Expand Down Expand Up @@ -74,6 +80,8 @@ jobs:
mkdir -p $HOME/bin
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag || '' }}
- name: Set up Go
uses: actions/setup-go@v5
id: setup-go
Expand All @@ -90,6 +98,8 @@ jobs:
run: make modtidy check-diff
- name: Parse release version and set REL_VERSION
run: python ./.github/scripts/get_release_version.py
env:
GITHUB_REF: ${{ inputs.tag && format('refs/tags/{0}', inputs.tag) || github.ref }}
- name: Setup test output
shell: bash
run: |
Expand Down Expand Up @@ -132,7 +142,7 @@ jobs:
publish:
name: Publish binaries
needs: build
if: startswith(github.ref, 'refs/tags/v')
if: startswith(github.ref, 'refs/tags/v') || inputs.tag != ''
env:
ARTIFACT_DIR: ./release
runs-on: ubuntu-latest
Expand All @@ -154,7 +164,6 @@ jobs:
- name: lists artifacts
run: ls -l ${{ env.ARTIFACT_DIR }}
- name: publish binaries to github
if: startswith(github.ref, 'refs/tags/v')
run: |
# Get the list of files
RELEASE_ARTIFACT=(${ARTIFACT_DIR}/*)
Expand All @@ -169,13 +178,17 @@ jobs:
publish-winget:
name: Publish to winget-pkgs
needs: publish
if: startswith(github.ref, 'refs/tags/v')
if: startswith(github.ref, 'refs/tags/v') || inputs.tag != ''
runs-on: windows-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag || '' }}
- name: Parse release version and set REL_VERSION
run: python ./.github/scripts/get_release_version.py
env:
GITHUB_REF: ${{ inputs.tag && format('refs/tags/{0}', inputs.tag) || github.ref }}
- name: Update winget manifests
shell: pwsh
run: |
Expand Down
Loading