Skip to content

Commit

Permalink
Add publish GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
Lotes committed Nov 13, 2024
1 parent 05d2ed3 commit 665251b
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish

permissions:
id-token: write

on:
release:
types: [published]

jobs:
publish:
name: Typir Publish
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Build
shell: bash
run: |
npm ci
npm run clean
npm run build
- name: Test
if: success() || failure()
shell: bash
run: |
npm run test
- name: Publish NPM Packages
shell: bash
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Update the following list when a new npm package is added
run: |
npm run publish:latest --provenance --workspace=typir
npm run publish:latest --provenance --workspace=typir-langium
12 changes: 12 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Release Process

The release process is mostly automated and requires running only a few commands. After commiting, pushing, tagging and releasing the changes, a GitHub Action will publish all npm packages.

1. Pull the latest changes
2. Uplift the package versions
Run `npm version major|minor|patch --no-git-tag-version --workspaces`
3. Update the dependency versions
Run `npm run version:dependencies`
4. Create a PR with your updated changes, get a review and merge it
5. Create a version tag on the latest commit on main and push it
6. Create a GitHub release from the new tag (this will automatically publish all artifacts)

0 comments on commit 665251b

Please sign in to comment.