@@ -70,83 +70,62 @@ jobs:
70
70
# 2. to the dev branch
71
71
# 3. with the label 'release:publish', and
72
72
# 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 ')
77
- #
73
+ if : github.event.pull_request.merged &&
74
+ github.ref == 'refs/heads/dev' &&
75
+ contains(github.event.pull_request.labels.*.name, 'release:publish') &&
76
+ startsWith(github.event.pull_request.title, '[chore] Release ')
78
77
79
78
runs-on : ubuntu-latest
80
79
81
80
steps :
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 ') }}
93
-
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
81
+ - name : Checkout source for publish
82
+ uses : actions/checkout@v2
83
+ with :
84
+ persist-credentials : false
106
85
107
- # - name: Publish preflight check
108
- # id: preflight
109
- # run: ./.github/scripts/publish_preflight_check.sh
86
+ - name : Publish preflight check
87
+ id : preflight
88
+ run : ./.github/scripts/publish_preflight_check.sh
110
89
111
90
# We authorize this step with an access token that has write access to the master branch.
112
- # - name: Merge to master
113
-
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
- # })
91
+ - name : Merge to master
92
+
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
+ })
123
102
124
103
# We pull this action from a custom fork of a contributor until
125
104
# https://github.com/actions/create-release/pull/32 is merged. Also note that v1 of
126
105
# this action does not support the "body" parameter.
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
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
138
117
139
118
# Post to Twitter if explicitly opted-in by adding the label 'release:tweet'.
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
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
0 commit comments