diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c2fdaf4..144e90e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,7 +3,6 @@ name: Publish Release on: release: types: [created] - workflow_dispatch: jobs: build-and-publish: @@ -15,5 +14,31 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: '20' + node-version: '22.x' registry-url: 'https://registry.npmjs.org' + + - name: Checkout github/workbench-template + uses: actions/checkout@v3 + with: + repository: github/workbench-template + path: . + token: ${{ secrets.RELEASE_GITHUB_PAT }} + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.21' + + - name: Run build script + env: + RELEASE_GITHUB_PAT: ${{ secrets.RELEASE_GITHUB_PAT }} + run: | + chmod +x ./build/build-release.sh + ./build/build-release.sh + + - name: Create Release and Upload Assets + uses: softprops/action-gh-release@v1 + with: + files: ./spark-sdk-dist/* + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_PAT }}