diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9bf0538..96b45b8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ jobs: if: github.event.deployment.environment == 'production' runs-on: ubuntu-latest env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + GITHUB_TOKEN: '${{ ecrets.GAUGEBOT_GITHUB_TOKEN }}' NPM_TOKEN: '${{ secrets.NPM_TOKEN }}' CI: true @@ -41,25 +41,15 @@ jobs: cd artifacts version=$(ls gauge-ts* | head -1 | sed "s/\.[^\.]*$//" | sed "s/gauge-ts-//" | sed "s/-[a-z]*\.[a-z0-9_]*$//"); if [ -z "$version" ]; then - echo "Gauge version is not set" + echo "version is not set" exit 1 fi + echo "VERSION=$version" >> $GITHUB_ENV echo -e "gauge-ts v$version\n\n" > desc.txt release_description=$(ruby -e "$(curl -sSfL https://github.com/getgauge/gauge/raw/master/build/create_release_text.rb)" getgauge gauge-ts) echo "$release_description" >> desc.txt - echo "Creating new draft for release v$version" - - gh release create "v$version" -F ./desc.txt - sleep 10 - - echo "Start uploading assets..." - for i in `ls $artifacts`; do - gh release upload "v$version" $i - done - - cat desc.txt - rm -rf desc.txt + gh release create --title "Gauge Typescript v${version}" --notes-file ./desc.txt "v${version}" gauge-ts* - name: Deploy npm working-directory: gauge-ts @@ -67,3 +57,12 @@ jobs: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | npm publish --access=public + + - name: Update metadata in gauge-repository + run: | + git clone https://github.com/getgauge/gauge-repository.git + cd gauge-repository + python update_metadata.py ts $VERSION + commit_message=$(echo -e "Update ts to v$VERSION") + git commit -am "$commit_message" + git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/getgauge/gauge-repository.git" master diff --git a/gauge-ts/package.json b/gauge-ts/package.json index 34079b2..1692ee6 100644 --- a/gauge-ts/package.json +++ b/gauge-ts/package.json @@ -1,6 +1,6 @@ { "name": "gauge-ts", - "version": "0.3.0", + "version": "0.3.1", "description": "Typescript runner for Gauge", "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/gauge-ts/ts.json b/gauge-ts/ts.json index 6baf6d6..9ee8798 100644 --- a/gauge-ts/ts.json +++ b/gauge-ts/ts.json @@ -16,6 +16,6 @@ "linux": ["./launcher.mjs", "--start"], "windows": ["launcher.bat", "--start"] }, - "version": "0.3.0", + "version": "0.3.1", "gRPCSupport": true } diff --git a/release.sh b/release.sh deleted file mode 100755 index b846c09..0000000 --- a/release.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -if [ -z "$GITHUB_TOKEN" ]; then - echo "GITHUB_TOKEN is not set." - echo "Please create an personal access token with repo:public_repo scopes." - exit 1 -fi - -curl \ - -X POST \ - -H "Authorization: token $GITHUB_TOKEN" \ - -H "Accept: application/vnd.github.ant-man-preview+json" \ - -H "Content-Type: application/json" \ - https://api.github.com/repos/getgauge/gauge-ts/deployments \ - --data '{"ref": "main", "required_contexts": [], "environment": "production"}'