Skip to content

Publish new release #57

Publish new release

Publish new release #57

Workflow file for this run

name: Publish new release
on:
workflow_dispatch:
schedule:
- cron: 0 18 * * 1
jobs:
setup:
name: Setup repository
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup repository
uses: ./.github/actions/setup-repository
build:
name: Build and check types
runs-on: ubuntu-latest
needs: [ setup ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run build script
uses: ./.github/actions/build
lint:
name: Lint
runs-on: ubuntu-latest
needs: [ setup ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Lint the codebase
uses: ./.github/actions/lint
test:
name: Run tests
runs-on: ubuntu-latest
needs: [ build ]
continue-on-error: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup repository
uses: ./.github/actions/setup-repository
- name: Run tests
run: npm test
publish_release:
permissions:
contents: write
id-token: write
runs-on: ubuntu-latest
needs: [ build, test, lint ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup repository
uses: ./.github/actions/setup-repository
- name: Request PAT from private key
id: requestPAT
run: |
node privateKeyToPAT.js ${{ secrets.RELEASE_BOT_KEY_BASE64 }} >> $GITHUB_OUTPUT
- name: Create and publish a new release
run: npx semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN_MSGROOM }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_MSGROOM }}
GH_TOKEN: ${{ steps.requestPAT.outputs.PAT }}
- name: Generate a tarball from the build results
run: npm pack
- name: Upload the tarball as an artifact
uses: actions/upload-artifact@v4
with:
path: msgroom-*.tgz
name: after_release