Skip to content

Commit 02f1823

Browse files
add github tagging workflow
1 parent c92fbd4 commit 02f1823

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/tag.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Tag Release Workflow
2+
3+
on:
4+
push:
5+
tags:
6+
- '*' # Trigger on any tag push.
7+
workflow_dispatch: # Allows manual triggering of the workflow
8+
9+
jobs:
10+
distribute-release:
11+
permissions:
12+
id-token: write
13+
contents: read
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.ref }} # Checkout the specific tag that triggered the workflow
22+
fetch-depth: 0 # Ensures the build matches the git tag.
23+
24+
- name: Authenticate to Pulumi
25+
uses: pulumi/auth-actions@v1
26+
with:
27+
organization: pequod
28+
requested-token-type: urn:pulumi:token-type:access_token:organization
29+
30+
- name: Publish Component to Pulumi Org
31+
if: github.event_name == 'push'
32+
run: |
33+
echo "Publishing latest component version to the pequod Pulumi org."
34+
pulumi package publish https://github.com/${{ github.repository }} --publisher pequod
35+
36+
- name: Manual run - Skip publishing
37+
if: github.event_name == 'workflow_dispatch'
38+
run: |
39+
echo "This is a manual workflow run."
40+
echo "Skipping component publishing to prevent accidental releases."
41+
echo "To publish, push a new tag instead of running manually."

0 commit comments

Comments
 (0)