Skip to content

Commit

Permalink
fix: prerelease on push (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyyynthia authored Jan 19, 2023
1 parent e56af05 commit 5e64fe3
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Pre-release
on:
push:
branches: [ next, prerelease ]

jobs:
prerelease:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: cache-node-modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci

- name: Build the CLI
run: npm run build
- name: Run npm release
run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_AUTHOR_NAME: Tolgee Machine
GIT_AUTHOR_EMAIL: machine@tolgee.io
GIT_COMMITTER_NAME: Tolgee Machine
GIT_COMMITTER_EMAIL: machine@tolgee.io
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release
on:
workflow_run:
workflows: [ Test ]
branches: [ main, next, prerelease ]
branches: [ main ]
types:
- completed

Expand Down

0 comments on commit 5e64fe3

Please sign in to comment.