Skip to content

Commit

Permalink
more hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi committed Oct 18, 2024
1 parent cb9c370 commit 598af8e
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 94 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/publish-generator-ts-hackweek.yml

This file was deleted.

115 changes: 58 additions & 57 deletions .github/workflows/publish-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ on:
push:
branches:
- main
paths:
- "generators/typescript/sdk/VERSION"
- dsinghvi/full-hackweek
# paths:
# - "generators/typescript/sdk/VERSION"
workflow_dispatch:
inputs:
generator:
Expand All @@ -20,65 +21,65 @@ env:
DOCKER_BUILDKIT: 1

jobs:
versions-changed:
runs-on: ubuntu-latest
outputs:
ts-sdk: ${{ steps.filter.outputs.ts-sdk }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
ts-sdk: 'generators/typescript/sdk/VERSION'
ts-browser-sdk:
runs-on: ubuntu-latest
if: ${{ needs.versions-changed.outputs.ts-sdk == 'true' || inputs.generator == 'typescript-sdk' }}
needs: versions-changed
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install
uses: ./.github/actions/install

- name: Print Version
if: ${{ inputs.generator != 'ts-sdk' }}
run: |
projectVersion=$(cat generators/typescript/sdk/VERSION)
echo $projectVersion
echo "VERSION=$projectVersion" >> $GITHUB_ENV
- name: Print Version Dev
if: ${{ inputs.generator == 'ts-sdk' }}
run: |
projectVersion=$(cat generators/typescript/sdk/VERSION)
commitNumber=$(git log --oneline | wc -l )
sha_short=$(git rev-parse --short HEAD)
echo $projectVersion-$commitNumber-$sha_short
echo "VERSION=$projectVersion-$commitNumber-$sha_short" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: fernapi
password: ${{ secrets.FERN_API_DOCKERHUB_PASSWORD }}

- name: Publish fernapi/fern-typescript-node-sdk docker
run: |
pnpm --filter @fern-typescript/sdk-generator-cli dockerTagVersion:browser "$VERSION"
docker push fernapi/fern-typescript-browser-sdk:"$VERSION"
# versions-changed:
# runs-on: ubuntu-latest
# outputs:
# ts-sdk: ${{ steps.filter.outputs.ts-sdk }}
# steps:
# - uses: actions/checkout@v2
# - uses: dorny/paths-filter@v2
# id: filter
# with:
# filters: |
# ts-sdk: 'generators/typescript/sdk/VERSION'

# ts-browser-sdk:
# runs-on: ubuntu-latest
# if: ${{ needs.versions-changed.outputs.ts-sdk == 'true' || inputs.generator == 'typescript-sdk' }}
# needs: versions-changed
# steps:
# - name: Checkout repo
# uses: actions/checkout@v4
# with:
# fetch-depth: 0

# - name: Install
# uses: ./.github/actions/install

# - name: Print Version
# if: ${{ inputs.generator != 'ts-sdk' }}
# run: |
# projectVersion=$(cat generators/typescript/sdk/VERSION)
# echo $projectVersion
# echo "VERSION=$projectVersion" >> $GITHUB_ENV

# - name: Print Version Dev
# if: ${{ inputs.generator == 'ts-sdk' }}
# run: |
# projectVersion=$(cat generators/typescript/sdk/VERSION)
# commitNumber=$(git log --oneline | wc -l )
# sha_short=$(git rev-parse --short HEAD)
# echo $projectVersion-$commitNumber-$sha_short
# echo "VERSION=$projectVersion-$commitNumber-$sha_short" >> $GITHUB_ENV

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1

# - name: Log in to Docker Hub
# uses: docker/login-action@v3
# with:
# username: fernapi
# password: ${{ secrets.FERN_API_DOCKERHUB_PASSWORD }}

# - name: Publish fernapi/fern-typescript-node-sdk docker
# run: |
# pnpm --filter @fern-typescript/sdk-generator-cli dockerTagVersion:browser "$VERSION"
# docker push fernapi/fern-typescript-browser-sdk:"$VERSION"

ts-node-sdk:
runs-on: ubuntu-latest
if: ${{ needs.versions-changed.outputs.ts-sdk == 'true' || inputs.generator == 'typescript-sdk' }}
needs: versions-changed
# needs: versions-changed
steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion generators/typescript/sdk/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.41.0-rc2
0.0.0-rc0

0 comments on commit 598af8e

Please sign in to comment.