From c4320f9d37e194cb502333f70158731c3f017ce4 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 7 Dec 2023 16:41:41 +0700 Subject: [PATCH] release: 1.0.0 --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f752aa5 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Release + +on: + push: + tags: + - releases/* + +jobs: + release: + name: Release + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.release.tag_name }} + - uses: actions/github-script@v7 + with: + script: | + const tag_name = context.ref; + const name = tag_name.replace(/^refs\/tags\/releases\//, ''); + const prerelease = name.startsWith("0."); + const owner = context.repo.owner; + const repo = context.repo.repo; + + github.rest.repos.createRelease({ + name, + owner, + prerelease, + repo, + tag_name, + }); diff --git a/package-lock.json b/package-lock.json index ed3061b..8b4b2b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@chr33s/base", - "version": "0.1.0", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@chr33s/base", - "version": "0.1.0", + "version": "1.0.0", "dependencies": { "@logtail/pino": "0.4.17", "@sentry/node": "7.85.0", diff --git a/package.json b/package.json index 6b11124..a52d2ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chr33s/base", - "version": "0.1.0", + "version": "1.0.0", "private": true, "engines": { "npm": "^10.0.0",