From d09fedb267ca68dcf1648f91433a0ca44d4a551f Mon Sep 17 00:00:00 2001 From: Soubhik Kumar Gon Date: Mon, 8 Jul 2024 22:48:43 +0530 Subject: [PATCH] feat: adds nightly release CI --- .github/workflows/public-release.yml | 47 ++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/public-release.yml diff --git a/.github/workflows/public-release.yml b/.github/workflows/public-release.yml new file mode 100644 index 0000000..9c631c4 --- /dev/null +++ b/.github/workflows/public-release.yml @@ -0,0 +1,47 @@ +name: Nightly Release + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' + + - name: Install dependencies + run: npm install + + - name: Bump version, create tag, and push changes + id: bump_version + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + CURRENT_VERSION=$(cat package.json | jq -r ".version") + echo "Current version: $CURRENT_VERSION" + NEW_VERSION=$(npm version patch -m "Release version %s [skip ci]") + echo "New version: $NEW_VERSION" + git push --follow-tags + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create GitHub Release + id: create_release + uses: actions/create-release@v1 + with: + tag_name: ${{ steps.bump_version.outputs.NEW_VERSION }} + release_name: Release ${{ steps.bump_version.outputs.NEW_VERSION }} + body: "Automated release created for version ${{ steps.bump_version.outputs.NEW_VERSION }}." + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index 167216a..9297972 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "terrier", "description": "configuration and management server for watchdog", - "version": "0.0.0", + "version": "0.5.0", "homepage": "", "private": true, "main": "src",