pipeline-test-versioning/.forgejo/workflows/release.yml

59 lines
1.9 KiB
YAML
Raw Permalink Normal View History

on:
issues:
2024-01-31 23:06:57 +01:00
types:
- opened
jobs:
release:
2024-01-31 23:06:57 +01:00
if: github.event.issue.title == 'release'
2024-02-09 18:50:52 +01:00
runs-on: docker
steps:
2024-01-31 23:31:13 +01:00
- name: Checkout
2024-02-09 18:51:23 +01:00
uses: https://github.com/actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2024-02-01 15:54:28 +01:00
with:
2024-02-02 00:22:20 +01:00
token: ${{ secrets.REPO_MAINTAINER_TOKEN }}
2024-01-31 23:31:13 +01:00
2024-02-01 11:24:14 +01:00
# 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"
2024-01-31 23:41:38 +01:00
- name: setup node
2024-02-09 18:51:23 +01:00
uses: https://github.com/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:
2024-02-01 00:00:57 +01:00
GITEA_URL: ${{ github.server_url }}
2024-02-01 15:54:28 +01:00
GITEA_TOKEN: ${{ github.token }}
2024-02-01 00:00:57 +01:00
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 \
@saithodev/semantic-release-gitea \
2024-01-31 23:41:38 +01:00
conventional-changelog-conventionalcommits \
@semantic-release/git \
2024-02-01 10:21:25 +01:00
@semantic-release/changelog \
@semantic-release/exec
2024-01-31 23:41:38 +01:00
2024-01-31 23:36:32 +01:00
npx semantic-release
2024-01-31 23:28:42 +01:00
2024-02-01 11:24:14 +01:00
- name: comment release end
2024-01-31 23:25:06 +01:00
shell: bash
2024-01-31 23:27:28 +01:00
run: |
# Can't update title more early, next version number is known after semantic-release, not before
2024-02-02 00:30:06 +01:00
./tea issues edit --title "Release v$(cat version.txt)" ${{ github.event.issue.number }}
2024-02-01 11:24:14 +01:00
./tea comment ${{ github.event.issue.number }} "Finished creating release"