Skip to content

Commit

Permalink
Merge pull request #4 from xeuxdev/dev
Browse files Browse the repository at this point in the history
modify workflow
  • Loading branch information
xeuxdev authored Oct 3, 2023
2 parents 92e6647 + 21ec2f9 commit f3b5749
Showing 1 changed file with 16 additions and 23 deletions.
39 changes: 16 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Release easymailer package to NPM

name: Publish
on:
release:
types: [created, edited, published]
workflow_run:
workflows: [CI]
workflows: [Main]
branches: [main]
types: [completed]
push:
branches:
- "main"

concurrency: ${{ github.workflow }}-${{ github.ref }}

Expand All @@ -15,32 +15,25 @@ permissions:
pull-requests: write

jobs:
release:
name: Release
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Setup pnpm 7
uses: pnpm/action-setup@v2
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7

- name: Setup Node.js 18.x
uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install Dependencies
run: pnpm i
node-version: 16.x
cache: "pnpm"

- name: Create Release Pull Request or Publish to npm
- run: pnpm install --frozen-lockfile
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: pnpm release
publish: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit f3b5749

Please sign in to comment.