@@ -40,12 +40,12 @@ jobs:
4040 # via the 'ref' client parameter.
4141 steps :
4242 - name : Checkout source for staging
43- uses : actions/checkout@v4
43+ uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
4444 with :
4545 ref : ${{ github.event.client_payload.ref || github.ref }}
4646
4747 - name : Set up JDK 8
48- uses : actions/setup-java@v4
48+ uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0
4949 with :
5050 distribution : ' zulu'
5151 java-version : 8
5959 # Attach the packaged artifacts to the workflow output. These can be manually
6060 # downloaded for later inspection if necessary.
6161 - name : Archive artifacts
62- uses : actions/upload-artifact@v4
62+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6363 with :
6464 name : dist
6565 path : dist
@@ -69,24 +69,25 @@ jobs:
6969
7070 # Check whether the release should be published. We publish only when the trigger PR is
7171 # 1. merged
72- # 2. to the master branch
72+ # 2. to the main branch
7373 # 3. with the label 'release:publish', and
7474 # 4. the title prefix '[chore] Release '.
7575 if : github.event.pull_request.merged &&
76- github.ref == 'refs/heads/master ' &&
76+ github.ref == 'refs/heads/main ' &&
7777 contains(github.event.pull_request.labels.*.name, 'release:publish') &&
7878 startsWith(github.event.pull_request.title, '[chore] Release ')
7979
8080 runs-on : ubuntu-latest
81+ environment : Release
8182 permissions :
8283 contents : write
8384
8485 steps :
8586 - name : Checkout source for publish
86- uses : actions/checkout@v4
87+ uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
8788
8889 - name : Set up JDK 8
89- uses : actions/setup-java@v4
90+ uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0
9091 with :
9192 distribution : ' zulu'
9293 java-version : 8
@@ -100,6 +101,7 @@ jobs:
100101 env :
101102 GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
102103 GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
104+ GPG_KEY_ID : ${{ secrets.GPG_KEY_ID }}
103105 CENTRAL_USERNAME : ${{ secrets.CENTRAL_USERNAME }}
104106 CENTRAL_TOKEN : ${{ secrets.CENTRAL_TOKEN }}
105107
@@ -111,17 +113,3 @@ jobs:
111113 --title "Firebase Admin Java SDK ${{ steps.preflight.outputs.version }}"
112114 --notes '${{ steps.preflight.outputs.changelog }}'
113115
114- # Post to Twitter if explicitly opted-in by adding the label 'release:tweet'.
115- - name : Post to Twitter
116- if : success() &&
117- contains(github.event.pull_request.labels.*.name, 'release:tweet')
118- uses : firebase/firebase-admin-node/.github/actions/send-tweet@master
119- with :
120- status : >
121- ${{ steps.preflight.outputs.version }} of @Firebase Admin Java SDK is available.
122- https://github.com/firebase/firebase-admin-java/releases/tag/${{ steps.preflight.outputs.version }}
123- consumer-key : ${{ secrets.TWITTER_CONSUMER_KEY }}
124- consumer-secret : ${{ secrets.TWITTER_CONSUMER_SECRET }}
125- access-token : ${{ secrets.TWITTER_ACCESS_TOKEN }}
126- access-token-secret : ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
127- continue-on-error : true
0 commit comments