58 lines
1.8 KiB
YAML
58 lines
1.8 KiB
YAML
on:
|
|
issues:
|
|
types:
|
|
- opened
|
|
|
|
jobs:
|
|
release:
|
|
if: github.event.issue.title == 'release'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
with:
|
|
token: ${{ secrets.REPO_MAINTAINER_TOKEN }}
|
|
|
|
# TODO extract dedicated action
|
|
- name: setup tea cli
|
|
shell: bash
|
|
env:
|
|
TEA_VERSION: main
|
|
run: |
|
|
wget https://dl.gitea.com/tea/${TEA_VERSION}/tea-${TEA_VERSION}-linux-amd64
|
|
mv tea* tea
|
|
chmod +x tea
|
|
./tea login add --url ${{ github.server_url }} --token ${{ github.token }}
|
|
|
|
- name: comment release start
|
|
shell: bash
|
|
run: |
|
|
./tea comment ${{ github.event.issue.number }} "Start creating release"
|
|
|
|
- name: setup node
|
|
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: semantic release
|
|
shell: bash
|
|
env:
|
|
GITEA_URL: ${{ github.server_url }}
|
|
GITEA_TOKEN: ${{ github.token }}
|
|
PROJECT_URL: ${{ github.server_url }}/${{ github.repository }}
|
|
run: |
|
|
npm install \
|
|
@saithodev/semantic-release-gitea \
|
|
conventional-changelog-conventionalcommits \
|
|
@semantic-release/git \
|
|
@semantic-release/changelog \
|
|
@semantic-release/exec
|
|
|
|
npx semantic-release
|
|
|
|
- name: comment release end
|
|
shell: bash
|
|
run: |
|
|
# Can't update title more early, next version number is known after semantic-release, not before
|
|
./tea issues edit --title "Release $(cat version.txt)" ${{ github.event.issue.number }}
|
|
./tea comment ${{ github.event.issue.number }} "Finished creating release"
|