-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86e045c
commit 69fec09
Showing
2 changed files
with
55 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,54 @@ | ||
on: | ||
push: | ||
branches: | ||
- ci | ||
|
||
name: release-please | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
with: | ||
release-type: node | ||
- uses: actions/checkout@v2 | ||
|
||
# If we didn't create a release, we may have created or updated a PR. | ||
- run: | | ||
# Check out the branch that release-please created, if it exists. | ||
git fetch | ||
git checkout release-please--branches--ci || exit 0 | ||
# If it does exist, update manifest.json in the PR branch. | ||
# release-please can't update it for us yet. See: | ||
# https://github.com/googleapis/release-please/issues/1171 | ||
VERSION=$(jq -r .version package.json) | ||
cp manifest.json manifest.json.orig | ||
jq -r ".version = \"$VERSION\"" manifest.json.orig > manifest.json | ||
git add manifest.json | ||
# Emulate the author of the existing commit (the bot). | ||
git config user.email "$(git log -n 1 --format='%ae')" | ||
git config user.name "$(git log -n 1 --format='%an')" | ||
# Update the PR. | ||
git commit --amend --no-edit | ||
git push -f | ||
if: ${{ ! steps.release.outputs.release_created }} | ||
# If we did create a release, we should attach the extension's zip file | ||
# to it. | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
registry-url: 'https://registry.npmjs.org' | ||
if: ${{ steps.release.outputs.release_created }} | ||
- run: npm run build | ||
if: ${{ steps.release.outputs.release_created }} | ||
- uses: svenstaro/upload-release-action@483c1e56f95e88835747b1c7c60581215016cbf2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ steps.release.outputs.tag_name }} | ||
file: eme_logger-*.zip | ||
file_glob: true | ||
overwrite: true | ||
if: ${{ steps.release.outputs.release_created }} |
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