Skip to content

Commit f1a8863

Browse files
[chore] Release Debugging release.yml (#584)
* Debugging release.yml - Release workflow does not get triggered during the GHA release process. - Debugging the script manually to investigate the issue. * Update release.yml * Update release.yml
1 parent 6e86ce8 commit f1a8863

File tree

1 file changed

+67
-46
lines changed

1 file changed

+67
-46
lines changed

.github/workflows/release.yml

Lines changed: 67 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -70,62 +70,83 @@ jobs:
7070
# 2. to the dev branch
7171
# 3. with the label 'release:publish', and
7272
# 4. the title prefix '[chore] Release '.
73-
if: github.event.pull_request.merged &&
74-
github.ref == 'dev' &&
75-
contains(github.event.pull_request.labels.*.name, 'release:publish') &&
76-
startsWith(github.event.pull_request.title, '[chore] Release ')
73+
# if: github.event.pull_request.merged &&
74+
# github.ref == 'dev' &&
75+
# contains(github.event.pull_request.labels.*.name, 'release:publish') &&
76+
# startsWith(github.event.pull_request.title, '[chore] Release ')
77+
#
7778

7879
runs-on: ubuntu-latest
7980

8081
steps:
81-
- name: Checkout source for publish
82-
uses: actions/checkout@v2
83-
with:
84-
persist-credentials: false
82+
- name: github.ref
83+
run: echo ${{ github.ref }}
84+
85+
- name: github.event.pull_request.merged
86+
run: echo ${{ github.event.pull_request.merged }}
87+
88+
- name: contains(github.event.pull_request.labels.*.name, 'release:publish')
89+
run: echo ${{ contains(github.event.pull_request.labels.*.name, 'release:publish') }}
90+
91+
- name: startsWith(github.event.pull_request.title, '[chore] Release ')
92+
run: echo ${{ startsWith(github.event.pull_request.title, '[chore] Release ') }}
8593

86-
- name: Publish preflight check
87-
id: preflight
88-
run: ./.github/scripts/publish_preflight_check.sh
94+
- name: check all conditions
95+
run: echo 'all true'
96+
if: github.event.pull_request.merged &&
97+
github.ref == 'dev' &&
98+
contains(github.event.pull_request.labels.*.name, 'release:publish') &&
99+
startsWith(github.event.pull_request.title, '[chore] Release ')
100+
101+
# steps:
102+
# - name: Checkout source for publish
103+
# uses: actions/checkout@v2
104+
# with:
105+
# persist-credentials: false
106+
107+
# - name: Publish preflight check
108+
# id: preflight
109+
# run: ./.github/scripts/publish_preflight_check.sh
89110

90111
# We authorize this step with an access token that has write access to the master branch.
91-
- name: Merge to master
92-
uses: actions/[email protected]
93-
with:
94-
github-token: ${{ secrets.FIREBASE_GITHUB_TOKEN }}
95-
script: |
96-
github.repos.merge({
97-
owner: context.repo.owner,
98-
repo: context.repo.repo,
99-
base: 'master',
100-
head: 'dev'
101-
})
112+
# - name: Merge to master
113+
# uses: actions/[email protected]
114+
# with:
115+
# github-token: ${{ secrets.FIREBASE_GITHUB_TOKEN }}
116+
# script: |
117+
# github.repos.merge({
118+
# owner: context.repo.owner,
119+
# repo: context.repo.repo,
120+
# base: 'master',
121+
# head: 'dev'
122+
# })
102123

103124
# We pull this action from a custom fork of a contributor until
104125
# https://github.com/actions/create-release/pull/32 is merged. Also note that v1 of
105126
# this action does not support the "body" parameter.
106-
- name: Create release tag
107-
uses: fleskesvor/create-release@1a72e235c178bf2ae6c51a8ae36febc24568c5fe
108-
env:
109-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
110-
with:
111-
tag_name: ${{ steps.preflight.outputs.version }}
112-
release_name: Firebase Admin Go SDK ${{ steps.preflight.outputs.version }}
113-
body: ${{ steps.preflight.outputs.changelog }}
114-
commitish: master
115-
draft: false
116-
prerelease: false
127+
# - name: Create release tag
128+
# uses: fleskesvor/create-release@1a72e235c178bf2ae6c51a8ae36febc24568c5fe
129+
# env:
130+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131+
# with:
132+
# tag_name: ${{ steps.preflight.outputs.version }}
133+
# release_name: Firebase Admin Go SDK ${{ steps.preflight.outputs.version }}
134+
# body: ${{ steps.preflight.outputs.changelog }}
135+
# commitish: master
136+
# draft: false
137+
# prerelease: false
117138

118139
# Post to Twitter if explicitly opted-in by adding the label 'release:tweet'.
119-
- name: Post to Twitter
120-
if: success() &&
121-
contains(github.event.pull_request.labels.*.name, 'release:tweet')
122-
uses: firebase/firebase-admin-node/.github/actions/send-tweet@master
123-
with:
124-
status: >
125-
${{ steps.preflight.outputs.version }} of @Firebase Admin Go SDK is available.
126-
https://github.com/firebase/firebase-admin-go/releases/tag/${{ steps.preflight.outputs.version }}
127-
consumer-key: ${{ secrets.FIREBASE_TWITTER_CONSUMER_KEY }}
128-
consumer-secret: ${{ secrets.FIREBASE_TWITTER_CONSUMER_SECRET }}
129-
access-token: ${{ secrets.FIREBASE_TWITTER_ACCESS_TOKEN }}
130-
access-token-secret: ${{ secrets.FIREBASE_TWITTER_ACCESS_TOKEN_SECRET }}
131-
continue-on-error: true
140+
# - name: Post to Twitter
141+
# if: success() &&
142+
# contains(github.event.pull_request.labels.*.name, 'release:tweet')
143+
# uses: firebase/firebase-admin-node/.github/actions/send-tweet@master
144+
# with:
145+
# status: >
146+
# ${{ steps.preflight.outputs.version }} of @Firebase Admin Go SDK is available.
147+
# https://github.com/firebase/firebase-admin-go/releases/tag/${{ steps.preflight.outputs.version }}
148+
# consumer-key: ${{ secrets.FIREBASE_TWITTER_CONSUMER_KEY }}
149+
# consumer-secret: ${{ secrets.FIREBASE_TWITTER_CONSUMER_SECRET }}
150+
# access-token: ${{ secrets.FIREBASE_TWITTER_ACCESS_TOKEN }}
151+
# access-token-secret: ${{ secrets.FIREBASE_TWITTER_ACCESS_TOKEN_SECRET }}
152+
# continue-on-error: true

0 commit comments

Comments
 (0)