This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
Merge pull request #195 from starknet-edu/steve/share/environment_setup #465
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: Push workflow | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release-version: | |
name: Releasing a version | |
runs-on: ubuntu-latest | |
if: ${{ !contains(github.event.head_commit.message, 'chore') || (github.ref_name == 'main' && !contains(github.event.head_commit.message, 'chore(release)')) }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.USER_TOKEN }} | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Install node_modules | |
run: yarn | |
- name: Authenticate with GitHub | |
run: | | |
git config --global user.name "${{ secrets.USER_NAME }}" | |
git config --global user.email "${{ secrets.USER_EMAIL }}" | |
- name: Run release script | |
if: ${{ github.ref_name == 'main' }} | |
run: yarn run release | |
- name: Push to remote branch | |
uses: ad-m/github-push-action@master | |
with: | |
USER_TOKEN: ${{ secrets.USER_TOKEN }} | |
branch: ${{ github.ref }} | |
tags: true | |
force: true |