build(config): add dry run step #35
Workflow file for this run
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: Production | |
on: | |
push: | |
branches: | |
- main | |
- 'pavel/workflow' | |
jobs: | |
Test: | |
name: π¨ Test π¨ | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node: [18] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Setup Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: "npm" | |
- run: npm install | |
- run: npm run build | |
- run: npm run format | |
Publish: | |
name: π Publish π | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node: [18] | |
os: [ubuntu-latest] | |
if: ${{ github.ref == 'refs/heads/main' }} | |
needs: [Test] | |
steps: | |
- name: β Setup node ${{ matrix.node }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: π₯ Download deps | |
uses: bahmutov/npm-install@v1 | |
with: | |
useLockFile: false | |
env: | |
HUSKY_SKIP_INSTALL: true | |
- name: π Build | |
run: npm run build | |
- name: π¨ Format | |
run: npm run format | |
- name: π Release Dry Run | |
uses: cycjimmy/semantic-release-action@v3 | |
id: semantic | |
with: | |
semantic_version: 18 | |
extra_plugins: | | |
@semantic-release/changelog | |
@semantic-release/git | |
@semantic-release/github | |
branches: | | |
[ | |
'main', | |
'next', | |
'next-major', | |
{name: 'beta', prerelease: true}, | |
{name: 'alpha', prerelease: true} | |
] | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }} | |
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} | |
GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }} | |
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }} | |
Dry: | |
name: π Dry Run π | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node: [18] | |
os: [ubuntu-latest] | |
if: ${{ github.ref == 'refs/heads/pavel/workflow' }} | |
needs: [Test] | |
steps: | |
- name: β Setup node ${{ matrix.node }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: π₯ Download deps | |
uses: bahmutov/npm-install@v1 | |
with: | |
useLockFile: false | |
env: | |
HUSKY_SKIP_INSTALL: true | |
- name: π Build | |
run: npm run build | |
- name: π¨ Format | |
run: npm run format | |
- name: π Release Dry Run | |
uses: cycjimmy/semantic-release-action@v3 | |
id: semantic | |
with: | |
semantic_version: 18 | |
dry_run: true | |
ci: false | |
extra_plugins: | | |
@semantic-release/changelog | |
@semantic-release/git | |
@semantic-release/github | |
branches: | | |
[ | |
'main', | |
'next', | |
'next-major', | |
{name: 'beta', prerelease: true}, | |
{name: 'alpha', prerelease: true} | |
] | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }} | |
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} | |
GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }} | |
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }} |