Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: relase github action fails because the build step is missing #48

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Generate tags and Deploy
name: Release

on:
workflow_dispatch
on: workflow_dispatch

jobs:
release-tags:
Expand All @@ -27,7 +26,7 @@ jobs:
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

deploy:
name: Deploy to AWS S3
runs-on: ubuntu-latest
Expand All @@ -45,18 +44,29 @@ jobs:
- name: Get the latest version
id: get_version
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"


- name: Setup node
uses: actions/setup-node@v3
with:
node-version: "18"

- name: Install dependencies
run: yarn

- name: Generate builds
run: yarn build

- name: Rename build files
run: |
current_version=$(echo "${{ steps.get_version.outputs.version }}")
mv dist/tarka-chat.es.js "dist/tarka-chat-${current_version}.es.js"
mv dist/tarka-chat.umd.js "dist/tarka-chat-${current_version}.umd.js"

- name: Push the files to S3 bucket
uses: jakejarvis/s3-sync-action@master
env:
SOURCE_DIR: 'dist'
SOURCE_DIR: "dist"
AWS_S3_BUCKET: ${{ env.AWS_S3_BUCKET }}
AWS_REGION: ${{ env.AWS_REGION }}
AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }}