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",