Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Commit

Permalink
Update the release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
andersfischernielsen authored Aug 7, 2023
1 parent 76df515 commit a15e947
Showing 1 changed file with 34 additions and 20 deletions.
54 changes: 34 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,45 @@
name: Config-Man-Workflow
name: Release
on:
pull_request:
branches:
- master
push:
branches:
- master
- main
jobs:
check:
name: 'Check, Lint, Test and Publish'
name: 'Check, Lint, Test'
runs-on: ubuntu-latest
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12
- run: 'yarn --frozen-lockfile --ignore-engines --ignore-optional --non-interactive --silent --ignore-scripts --production=false; yarn peer'
node-version: 20
- run: |
yarn --frozen-lockfile --ignore-engines --ignore-optional --non-interactive --silent --ignore-scripts --production=false
yarn peer
- name: TypeScript Check
run: 'yarn typecheck'
run: yarn typecheck
- name: Lint
run: 'yarn lint'
run: yarn lint
- name: Test
run: 'yarn test'
- name: 'Publish'
if: github.event_name == 'push'
run: yarn build && npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" && cd dist && npm publish
run: yarn test

release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0

- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_RELEASE_KEY }}

- name: Release
run: |
npx --package=@auto-it/git-tag --package=@auto-it/omit-release-notes --package=auto -- auto shipit
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit a15e947

Please sign in to comment.