Merge pull request #10 from dyte-in/feat/WEB-3445-symbl-custom-connec… #22
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
name: Release to GHR | |
on: | |
push: | |
branches: | |
- staging | |
- main | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
registry-url: https://npm.pkg.github.com | |
scope: "@dyte-in" | |
- name: Set NPM_TOKEN | |
run: echo "NPM_TOKEN=${{ secrets.NPM_TOKEN }}" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: npm install | |
- name: Build package | |
run: npm run build | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ENVIRONMENT: ${{ github.ref }} | |
GHR: true | |
run: npx semantic-release | |
- name: Update staging branch | |
if: | | |
contains('refs/heads/main', github.ref) | |
run: | | |
git pull | |
git stash | |
git checkout staging | |
git merge main | |
git push --set-upstream origin staging |