2024-01-31 23:04:14 +01:00
|
|
|
on:
|
|
|
|
issues:
|
2024-01-31 23:06:57 +01:00
|
|
|
types:
|
|
|
|
- opened
|
2024-01-31 23:04:14 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
2024-01-31 23:06:57 +01:00
|
|
|
if: github.event.issue.title == 'release'
|
2024-01-31 23:04:14 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-01-31 23:31:13 +01:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
|
|
|
2024-01-31 23:41:38 +01:00
|
|
|
- name: setup node
|
|
|
|
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
|
2024-01-31 23:39:37 +01:00
|
|
|
with:
|
|
|
|
node-version: 20
|
|
|
|
|
2024-01-31 23:36:32 +01:00
|
|
|
- name: semantic release
|
|
|
|
shell: bash
|
2024-01-31 23:49:16 +01:00
|
|
|
env:
|
|
|
|
PROJECT_URL: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
|
2024-01-31 23:36:32 +01:00
|
|
|
run: |
|
2024-01-31 23:41:38 +01:00
|
|
|
npm install \
|
2024-01-31 23:45:32 +01:00
|
|
|
@saithodev/semantic-release-gitea \
|
2024-01-31 23:41:38 +01:00
|
|
|
conventional-changelog-conventionalcommits \
|
|
|
|
@semantic-release/git \
|
|
|
|
@semantic-release/changelog
|
|
|
|
|
2024-01-31 23:36:32 +01:00
|
|
|
npx semantic-release
|
|
|
|
|
2024-01-31 23:33:41 +01:00
|
|
|
# TODO extract dedicated action
|
2024-01-31 23:35:01 +01:00
|
|
|
- name: setup tea cli
|
2024-01-31 23:04:14 +01:00
|
|
|
shell: bash
|
2024-01-31 23:33:41 +01:00
|
|
|
env:
|
|
|
|
TEA_VERSION: 0.9.2
|
2024-01-31 23:19:14 +01:00
|
|
|
run: |
|
2024-01-31 23:33:41 +01:00
|
|
|
wget https://dl.gitea.com/tea/${TEA_VERSION}/tea-${TEA_VERSION}-linux-386
|
2024-01-31 23:25:06 +01:00
|
|
|
mv tea* tea
|
|
|
|
chmod +x tea
|
2024-01-31 23:30:16 +01:00
|
|
|
./tea login add --url ${{ github.server_url }} --token ${{ github.token }}
|
2024-01-31 23:28:42 +01:00
|
|
|
|
2024-01-31 23:33:41 +01:00
|
|
|
- name: close issue
|
2024-01-31 23:25:06 +01:00
|
|
|
shell: bash
|
2024-01-31 23:27:28 +01:00
|
|
|
run: |
|
2024-01-31 23:31:56 +01:00
|
|
|
./tea i close ${{ github.event.issue.number }}
|