Skip to content
Open
Show file tree
Hide file tree
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
49 changes: 37 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Release
on:
push:
branches:
- main
tags:
- 'v*.*.*'

jobs:
build_wasm:
name: build for node.js
Expand All @@ -20,20 +21,19 @@ jobs:
with:
name: node_lua_with_lrdb
path: node/bin/node_lua_with_lrdb.*
release:

publish:
needs: build_wasm
name: Release
name: Publish to NPM
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- name: Download a node_lua_with_lrdb
uses: actions/download-artifact@v4
with:
Expand All @@ -43,9 +43,34 @@ jobs:
working-directory: node
- run: npm run bundle
working-directory: node
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
- name: Get version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Update package version
run: npm version ${{ steps.get_version.outputs.VERSION }} --no-git-tag-version
working-directory: node
- name: Publish to NPM
run: npm publish
working-directory: node
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

create_release:
needs: publish
name: Create GitHub Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: node_lua_with_lrdb
path: artifacts/
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: artifacts/*
generate_release_notes: true
2 changes: 1 addition & 1 deletion node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lrdb-debuggable-lua",
"version": "0.6.0",
"version": "0.6.0-dev",
"main": "dist/index",
"license": "MIT",
"scripts": {
Expand Down
Loading