1
1
mirror of https://github.com/theoludwig/libcproject.git synced 2024-11-14 16:03:13 +01:00
libcproject/.github/workflows/release.yml

60 lines
1.8 KiB
YAML
Raw Normal View History

name: "Release"
2023-01-05 21:13:10 +01:00
on:
push:
2024-09-15 18:39:10 +02:00
branches: [main]
2023-01-05 21:13:10 +01:00
jobs:
release:
runs-on: "ubuntu-latest"
2023-01-05 21:13:10 +01:00
steps:
2024-09-15 18:38:21 +02:00
- uses: "actions/checkout@v4.1.7"
2023-01-05 21:13:10 +01:00
with:
fetch-depth: 0
persist-credentials: false
2023-12-26 19:42:12 +01:00
submodules: "recursive"
2023-01-05 21:13:10 +01:00
- name: "Import GPG key"
2023-12-26 19:42:12 +01:00
uses: "crazy-max/ghaction-import-gpg@v6.1.0"
2023-01-05 21:13:10 +01:00
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true
- run: "sudo apt update"
2023-08-05 15:03:53 +02:00
- name: "Install Build Tools"
run: "sudo apt install --yes build-essential gcc make clang-format"
2023-08-05 15:03:53 +02:00
- name: "Install Documentation Tools"
run: "sudo apt install --yes doxygen doxygen-gui doxygen-doc graphviz"
2023-01-05 21:13:10 +01:00
- run: "make set_version"
2023-01-05 21:13:10 +01:00
- name: "Use Node.js"
2024-09-15 18:38:21 +02:00
uses: "actions/setup-node@v4.0.3"
2023-01-05 21:13:10 +01:00
with:
2024-09-15 18:38:21 +02:00
node-version: "20.17.0"
2023-01-05 21:13:10 +01:00
- name: "Install Release Tools"
2024-09-15 18:38:21 +02:00
run: "npm install --save-dev semantic-release@23.1.1 @commitlint/cli@19.5.0 @commitlint/config-conventional@19.5.0 @semantic-release/git@10.0.1 @semantic-release/exec@6.0.3 @saithodev/semantic-release-backmerge@4.0.1 vercel@37.4.2"
2023-01-05 21:13:10 +01:00
- run: "rm --force package.json package-lock.json"
- name: "Release"
run: "npx semantic-release"
2023-01-05 21:13:10 +01:00
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GIT_COMMITTER_NAME: ${{ secrets.GIT_NAME }}
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_EMAIL }}
2023-01-06 16:32:29 +01:00
- name: "Generate Documentation"
run: "make documentation"
- name: "Deploy to Vercel"
2023-01-06 16:32:29 +01:00
run: 'npx vercel ./documentation/html --token="${VERCEL_TOKEN}" --prod'
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}