Skip to content

Commit

Permalink
adding CI step to build and realse js version when fasten-sources rel…
Browse files Browse the repository at this point in the history
…ease step is run.
  • Loading branch information
AnalogJ committed May 30, 2024
1 parent 6a792ad commit 395ac60
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
release:
name: Create Release Commit
runs-on: ubuntu-latest
container: ghcr.io/packagrio/packagr:latest-golang
# Service containers to run with `build` (Required for end-to-end testing)
steps:
- name: Checkout
Expand All @@ -32,9 +31,11 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
# - name: Test
# run: |
# go mod
- name: Generate JS Package
run: |
go install github.com/gzuidhof/tygo@latest
make build-js
npm version ${{ steps.bump_version.outputs.release_version }} --no-git-tag-version
- name: Commit Changes Locally
id: commit
uses: packagrio/action-releasr-go@master
Expand All @@ -48,3 +49,9 @@ jobs:
env:
# This is necessary in order to push a commit to the repo
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
- name: Publish JS Package
run: |
make publish-js
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ deps:
.PHONY: serve-backend
serve-backend: deps
cd testutils && go run oauth_cli.go
test:
go test ./...

# Steps related to building and publishing fasten-sources-js library.

build-js:
tygo generate

publish-js: build-js
npm install -g typescript
cd js && tsc
cd js && npm run pub

test:
go test ./...
publish-js:
cd js && npm run pub

0 comments on commit 395ac60

Please sign in to comment.