-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,43 @@ | ||
name: "Build" | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
publish: | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node v20 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install TypeScript | ||
run: npm install typescript --save-dev | ||
- name: Run tsc | ||
run: npx tsc --outDir out/ | ||
- name: Package hooks into tar | ||
|
||
- name: Transpile TypeScript | ||
run: npx tsc --outDir dist | ||
|
||
- name: Package hooks into tar.gz | ||
run: | | ||
pushd out | ||
cp ../repo.json . | ||
7z a -bb0 hooks.tar * | ||
mv hooks.tar ../ | ||
pushd dist | ||
cp ../COPYING . | ||
7z a -bb0 -sdel hooks.tar * | ||
7z a -bb0 -sdel hooks.tar.gz hooks.tar | ||
popd | ||
- name: Compress hooks.tar | ||
run: 7z a -bb0 -sdel hooks.tar.gz hooks.tar | ||
- name: Package hooks types | ||
run: 7z a hooks.types.zip types/* | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: | | ||
COPYING | ||
hooks.tar.gz | ||
dist/* |