From 3bb4273165c3fec7034332d89db1304bb8d5558e Mon Sep 17 00:00:00 2001 From: Artur Stambultsian Date: Sat, 7 Sep 2024 16:26:35 +0100 Subject: [PATCH] added prerelease and release workflows --- .github/workflows/prerelease.yml | 22 +++++++++++++++++++ .../workflows/{publish.yml => release.yml} | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/prerelease.yml rename .github/workflows/{publish.yml => release.yml} (92%) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml new file mode 100644 index 0000000..6347ede --- /dev/null +++ b/.github/workflows/prerelease.yml @@ -0,0 +1,22 @@ +name: Prerelease +on: + release: + types: [prereleased] +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v4 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm run build + - run: npm publish --access public --tag beta + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/release.yml similarity index 92% rename from .github/workflows/publish.yml rename to .github/workflows/release.yml index a819992..ca32094 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,7 @@ -name: Publish +name: Prerelease on: release: - types: [published] + types: [released] jobs: publish: runs-on: ubuntu-latest