Skip to content

Commit

Permalink
chore(actions): include publishing action
Browse files Browse the repository at this point in the history
  • Loading branch information
CompeyDev committed Mar 30, 2024
1 parent 7b51d3a commit d76c6c6
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish

on:
push:
tags:
- "**"
workflow_dispatch:

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install PNPM
uses: pnpm/action-setup@v3

- name: Install Node
uses: actions/[email protected]
with:
cache: "pnpm"

- name: Install dependencies
run: pnpm i

- name: Install tooling
uses: ok-nick/[email protected]
with:
cache: true

- name: Build package
id: export
run: echo "tarball=$(pnpm export | tail -n 1)" >> "$GITHUB_OUTPUT"

- name: Publish artifacts
uses: ncipollo/release-action@v1
with:
artifacts: "${{ steps.export.outputs.tarball }}"
body: "See [CHANGELOG.md](https://github.com/0x5eal/wg-lua/blob/main/CHANGELOG.md) for more details."
draft: true
2 changes: 0 additions & 2 deletions .lune/bundle.luau
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ function main()

if path == LUAU_TYPES_PATH then
bundle = fs.readFile(LUAU_TYPES_PATH)
print(bundle)
elseif path == TS_TYPES_PATH then
bundle = fs.readFile(TS_TYPES_PATH)
print(bundle)
end

path = "out/" .. path:split("/")[3]
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "A lua implementation of the wireguard keygen algorithm.",
"main": "out/init.lua",
"scripts": {
"export": "pnpm build && pnpm pack",
"build": "rbxtsc --verbose && ./lunew bundle",
"watch": "rbxtsc -w",
"lint": "eslint src",
Expand Down

0 comments on commit d76c6c6

Please sign in to comment.