Skip to content

chore: add semantic-release and renovate (#3) #1

chore: add semantic-release and renovate (#3)

chore: add semantic-release and renovate (#3) #1

Workflow file for this run

name: Release
on:
push:
branches:
- main
- alpha
jobs:
release:
name: Release
environment:
name: npm-production
runs-on: ubuntu-latest
permissions:
contents: read # for checkout
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Create app token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.ECOSPARK_APP_ID }}
private-key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v4
with:
# Need all history to analyze commits since last release
fetch-depth: 0
# Uses generated token to allow pushing commits back
token: ${{ steps.app-token.outputs.token }}
# Make sure GITHUB_TOKEN will not be persisted in repo's config
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm t
- name: Release
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
run: npx semantic-release