Skip to content

Commit

Permalink
Modify release tasks
Browse files Browse the repository at this point in the history
Signed-off-by: Zabil Cheriya Maliackal <[email protected]>
  • Loading branch information
zabil committed Jun 11, 2024
1 parent f13b2e9 commit ad32fa2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,30 @@ jobs:
CI: true

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: '10.x'
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'

- run: npm install
- name: package
run: |
npm build
./build.sh package
- name: Setup git
run: |
git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
- run: Install dependencies
npm install

- name: Package
working-directory: gauge-ts
run: |
npm build
./build.sh package
- name: Deploy on github
working-directory: gauge-ts
run: |
cd artifacts
version=$(ls gauge-ts* | head -1 | sed "s/\.[^\.]*$//" | sed "s/gauge-ts-//" | sed "s/-[a-z]*\.[a-z0-9_]*$//");
Expand All @@ -40,22 +45,23 @@ jobs:
fi
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)" BugDiver gauge-ts)
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"
hub release create -F ./desc.txt "v$version"
gh release create "v$version" ./desc.txt
sleep 10
echo "Start uploading assets..."
for i in `ls $artifacts`; do
hub release edit -m "" -a $i "v$version"
gh release upload "v$version" $i
done
cat desc.txt
rm -rf desc.txt
- name: Deploy npm
working-directory: gauge-ts
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tests
jest*
TODO*
ts*
launcher.js
launcher.mjs
azure*
.gitmodules
*.ps1
Expand Down

0 comments on commit ad32fa2

Please sign in to comment.