Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/alienmark-package-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: "AlienMark: Publish Package"

on:
workflow_dispatch:

permissions:
contents: read
packages: write

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Ensure main branch
if: github.ref != 'refs/heads/main'
run: |
echo "::error::AlienMark package publishing is only allowed from the main branch."
exit 1

- name: Checkout repository
uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
run_install: false

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml
registry-url: "https://npm.pkg.github.com"
scope: "@lazyalienserver"

- name: Enable Corepack
run: corepack enable

- name: Install workspace dependencies
run: pnpm install --frozen-lockfile

- name: Run AlienMark type check
run: pnpm --filter alienmark check

- name: Run AlienMark tests
run: pnpm --filter alienmark test

- name: Build AlienMark
run: pnpm --filter alienmark build

- name: Configure package metadata for GitHub Packages
working-directory: packages/alienmark
run: |
npm pkg set name="@lazyalienserver/alienmark"
npm pkg set publishConfig.registry="https://npm.pkg.github.com"
npm pkg set repository.type="git"
npm pkg set repository.url="git+https://github.com/LazyAlienServer/alien-commons.git"
npm pkg set repository.directory="packages/alienmark"

- name: Publish AlienMark to GitHub Packages
working-directory: packages/alienmark
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm publish
Loading