Skip to content

Commit

Permalink
ci: 🎡 fix release step in main workflow (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
theashraf authored Jun 14, 2024
1 parent 58bd4af commit 1949216
Showing 1 changed file with 6 additions and 27 deletions.
33 changes: 6 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: main

on:
push:
branches:
- 'main'
pull_request:
types: [opened, synchronize, reopened, closed, ready_for_review]

jobs:
validate:
Expand Down Expand Up @@ -57,13 +58,11 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

npm-release:
name: npm-release
release:
name: release
needs: validate
runs-on: ubuntu-latest
if:
github.event_name == 'pull_request' && github.event.pull_request.merged == true &&
github.event.pull_request.base.ref == 'main'
if: ${{ github.repository == 'LottieFiles/dotlottie-web' && github.event_name == 'push' }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
Expand Down Expand Up @@ -109,26 +108,6 @@ jobs:
- name: Remove existing NPM .npmrc
run: rm -f "$HOME/.npmrc"

gpr-release:
name: gpr-release
needs: [validate, npm-release]
runs-on: ubuntu-latest
if: >
github.event_name == 'pull_request' && github.event.pull_request.merged == true &&
github.event.pull_request.base.ref == 'main' && github.event.pull_request.head.ref == 'changeset-release/main'
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
with:
# https://github.com/changesets/action/issues/201#issuecomment-1206088289
# check out all commits and tags so changeset can skip duplicate tags
fetch-depth: 0

- name: ⎔ Setup pnpm@v8
uses: pnpm/action-setup@v2
with:
version: 8

- name: ⎔ Setup Node@v18 for Github Packages
uses: actions/setup-node@v4
with:
Expand Down

0 comments on commit 1949216

Please sign in to comment.