-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from hookdeck/reinstate-fern
Add Fern back to GH Action
- Loading branch information
Showing
1 changed file
with
7 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,10 +11,6 @@ on: | |
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
steps: | ||
- name: Checkout repo | ||
|
@@ -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 |