Skip to content

build(config): add dry run step #35

build(config): add dry run step

build(config): add dry run step #35

Workflow file for this run

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 }}