Skip to content

Commit

Permalink
Merge pull request #30 from hookdeck/reinstate-fern
Browse files Browse the repository at this point in the history
Add Fern back to GH Action
  • Loading branch information
leggetter authored Apr 17, 2024
2 parents 04896fb + a942307 commit dd92eee
Showing 1 changed file with 7 additions and 50 deletions.
57 changes: 7 additions & 50 deletions .github/workflows/ts-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ on:
jobs:
release:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- name: Checkout repo
Expand All @@ -23,51 +19,12 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3

# - name: Download Fern
# run: npm install -g fern-api

# - name: Publish to NPM
# env:
# FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# run: |
# fern generate --group node-sdk --version ${{ inputs.version }} --log-level debug
- name: Download Fern
run: npm install -g fern-api

# - uses: actions/checkout@v4
# with:
# # Repository name with owner. For example, actions/checkout
# # Default: ${{ github.repository }}
# repository: 'hookdeck/hookdeck-typescript-sdk.git'
# path: 'hookdeck-typescript-sdk'
# ref: 'main'
# token: ${{ secrets.GH_ACCESS_TOKEN }}

- name: Clone hookdeck-typescript-sdk for JSR
- name: Publish to NPM
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
git clone https://oauth2:${{ secrets.GH_ACCESS_TOKEN }}:@github.com/hookdeck/hookdeck-typescript-sdk.git
git remote set-url --push origin https://oauth2:${{ secrets.GH_ACCESS_TOKEN }}:@github.com/hookdeck/hookdeck-typescript-sdk.git
- name: Update jsr.json version
uses: jossef/[email protected]
with:
file: './hookdeck-typescript-sdk/jsr.json'
field: version
value: ${{ inputs.version }}

- name: Commit jsr.json
run: |
cd hookdeck-typescript-sdk
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git commit -m "docs: updating JSR release ${{ inputs.version }}"
- name: Push jsr.json changes
uses: ad-m/[email protected]
with:
github_token: ${{ github.token }}
tags: true

- name: Publish to JSR.io
run: npx jsr publish
fern generate --group node-sdk --version ${{ inputs.version }} --log-level debug

0 comments on commit dd92eee

Please sign in to comment.