-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add workflow for automated release PRs
- Loading branch information
1 parent
1842797
commit 87a5649
Showing
2 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- v[0-9]* | ||
|
||
name: Release | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
release_created: ${{ steps.release.outputs.release_created }} | ||
tag_name: ${{ steps.release.outputs.tag_name }} | ||
steps: | ||
# Create/update release PR | ||
- uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
with: | ||
# Required input to specify the release type (node package). | ||
release-type: node | ||
# Make sure the player version gets updated. | ||
extra-files: lib/player.js | ||
# Make sure we create the PR against the correct branch. | ||
default-branch: ${{ github.ref_name }} | ||
|
||
# The jobs below are all conditional on a release having been created by | ||
# someone merging the release PR. They all run in parallel. | ||
|
||
npm: | ||
runs-on: ubuntu-latest | ||
needs: release | ||
if: ${{ needs.release.outputs.release_created }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm ci | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
- run: npm pack | ||
- uses: svenstaro/upload-release-action@483c1e56f95e88835747b1c7c60581215016cbf2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ needs.release.outputs.tag_name }} | ||
file: shaka-player-*.tgz | ||
file_glob: true | ||
overwrite: true | ||
|
||
# TODO: Publish to appspot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters