Skip to content

Commit

Permalink
fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Delusoire committed Jun 15, 2024
1 parent 799d286 commit 045c5b7
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions .github/workflows/build.yml
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/*

0 comments on commit 045c5b7

Please sign in to comment.