Skip to content

Commit

Permalink
feat(actions): switch to GitHub action for releases (#2458)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Dec 1, 2020
1 parent 865a32e commit d473ac3
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
Empty file removed .github/publish.yml
Empty file.
1 change: 0 additions & 1 deletion .github/release-please.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
on:
push:
branches:
- main
name: release-please
jobs:
release-please-pr:
runs-on: ubuntu-latest
steps:
- id: release-pr
uses: GoogleCloudPlatform/release-please-action@v2
with:
token: ${{ secrets.FORKING_TOKEN }}
release-type: node
fork: true
package-name: googleapis
command: release-pr
- id: label
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
await github.issues.addLabels({
owner,
repo,
issue_number: ${{steps.release-pr.outputs.pr}},
labels: ['autorelease: pending']
});
console.log(`Tagged ${{steps.release-pr.outputs.pr}}`)
release-please-release:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v2
id: tag-release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
package-name: googleapis
command: github-release
- uses: actions/setup-node@v1
if: ${{ steps.tag-release.outputs.release_created }}
with:
node-version: 14
registry-url: 'https://wombat-dressing-room.appspot.com/'
- name: publish
if: ${{ steps.tag-release.outputs.release_created }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
npm install
npm publish

0 comments on commit d473ac3

Please sign in to comment.