Files
zettelclean/.github/workflows/release.yml
Ruben Carlo Benante e83b95c6ee
Some checks failed
Zettelclean CI / build (20.x) (push) Has been cancelled
Zettelclean CI / build (22.x) (push) Has been cancelled
Zettelclean CI / build (24.x) (push) Has been cancelled
Release Zettelclean / build (push) Has been cancelled
pnpm corepack, CI bugfix and no warnings for TIMEID
2026-07-28 21:27:47 -03:00

77 lines
3.2 KiB
YAML

# **************************************************************************
# * (C)opyright 2026 by Ruben Carlo Benante *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it under the terms of the GNU General Public License as published by *
# * the Free Software Foundation, either version 3 of the License, or *
# * (at your option) any later version. *
# * *
# * This program is distributed in the hope that it will be useful, *
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
# * GNU General Public License for more details. *
# * *
# * You should have received a copy of the GNU General Public License *
# * along with this program. If not, see http://www.gnu.org/licenses/. *
# * *
# * Contact author at: *
# * Ruben Carlo Benante *
# * rcb@beco.cc *
# **************************************************************************
name: Release Zettelclean
on:
push:
tags:
- '*'
jobs:
build:
runs-on: slackware-15
permissions:
contents: write
id-token: write
attestations: write
steps:
- uses: actions/checkout@v6
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version: 24
# Node ships corepack, which selects the pnpm version pinned in
# package.json ("packageManager"). If this self-hosted runner has no
# Node, drop the setup-node step above and rely on a preinstalled Node.
- name: Enable pnpm
run: corepack enable
- name: Build plugin
run: |
pnpm install --frozen-lockfile
pnpm run build
- name: Check for optional styles
id: styles
run: |
[ -f styles.css ] && echo "exists=true" >> "$GITHUB_OUTPUT" || echo "exists=false" >> "$GITHUB_OUTPUT"
- name: Attest build provenance
uses: actions/attest@v4
with:
subject-path: |
main.js
${{ steps.styles.outputs.exists == 'true' && 'styles.css' || '' }}
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag="${GITHUB_REF#refs/tags/}"
gh release create "$tag" \
--title="Zettelclean $tag" \
--draft \
main.js manifest.json ${{ steps.styles.outputs.exists == 'true' && 'styles.css' || '' }}