Skip to content

Commit

Permalink
feat: push update to v1 branch on publish
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Nov 10, 2019
1 parent 12d2a28 commit a71fe0e
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,18 @@ jobs:
# https://github.com/cycjimmy/semantic-release-action
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v2
id: semantic
with:
branch: master
extra_plugins: |
@semantic-release/git
@semantic-release/changelog
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# - run: npm run semantic-release
# env:
# # need environment variables for publishing new release
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Push updates to branch v1
if: steps.semantic.outputs.new-release-published == 'true'
run: 'git push https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:refs/heads/v1'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit a71fe0e

Please sign in to comment.