2023-10-31 21:17:39 +03:00
|
|
|
name: Run release
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
kind:
|
|
|
|
description: 'Release kind (major, minor, patch)'
|
|
|
|
required: true
|
2024-12-02 08:42:18 +03:00
|
|
|
default: 'auto'
|
2023-10-31 21:17:39 +03:00
|
|
|
type: choice
|
|
|
|
options:
|
2024-12-02 08:42:18 +03:00
|
|
|
- auto
|
2023-10-31 21:17:39 +03:00
|
|
|
- major
|
|
|
|
- minor
|
|
|
|
- patch
|
2024-04-27 11:14:52 +03:00
|
|
|
branch:
|
|
|
|
description: 'Branch to release from'
|
|
|
|
required: true
|
|
|
|
default: 'master'
|
2023-10-31 21:17:39 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
packages: write
|
2024-12-02 08:42:18 +03:00
|
|
|
id-token: write
|
2023-10-31 21:17:39 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
token: ${{ secrets.BOT_PAT }}
|
2024-04-27 11:14:52 +03:00
|
|
|
- if: ${{ github.event.inputs.branch != 'master' }}
|
|
|
|
run: git checkout ${{ github.event.inputs.branch }}
|
2024-12-02 08:42:18 +03:00
|
|
|
|
2023-11-29 20:31:18 +03:00
|
|
|
- uses: ./.github/actions/init
|
2024-12-02 08:42:18 +03:00
|
|
|
- uses: denoland/setup-deno@v1
|
|
|
|
with:
|
|
|
|
deno-version: '2.0'
|
|
|
|
|
2023-10-31 21:17:39 +03:00
|
|
|
- name: Initialize configs
|
|
|
|
run: |
|
|
|
|
git config user.name "mtcute-bot"
|
|
|
|
git config user.email mtcute-bot@tei.su
|
2024-12-02 08:42:18 +03:00
|
|
|
|
|
|
|
- name: Run release
|
2023-10-31 21:17:39 +03:00
|
|
|
env:
|
2024-04-13 06:59:12 +03:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2024-03-24 01:31:44 +03:00
|
|
|
run: |
|
2024-12-02 08:42:18 +03:00
|
|
|
fuman-build release \
|
|
|
|
--kind=${{ github.event.inputs.kind }} \
|
|
|
|
--with-npm \
|
|
|
|
--npm-token=${{ secrets.NPM_TOKEN }} \
|
|
|
|
--with-jsr \
|
|
|
|
--with-github-release
|