fix: rename to forgejo
This commit is contained in:
parent
94b2a6b89b
commit
b733ee86fa
2 changed files with 0 additions and 0 deletions
58
.forgejo/workflows/release.yml
Normal file
58
.forgejo/workflows/release.yml
Normal file
|
@ -0,0 +1,58 @@
|
|||
on:
|
||||
issues:
|
||||
types:
|
||||
- opened
|
||||
|
||||
jobs:
|
||||
release:
|
||||
if: github.event.issue.title == 'release'
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://github.com/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: https://github.com/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 v$(cat version.txt)" ${{ github.event.issue.number }}
|
||||
./tea comment ${{ github.event.issue.number }} "Finished creating release"
|
33
.forgejo/workflows/tag.yml
Normal file
33
.forgejo/workflows/tag.yml
Normal file
|
@ -0,0 +1,33 @@
|
|||
name: on tags
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://github.com/actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- name: setup tea cli
|
||||
shell: bash
|
||||
env:
|
||||
TEA_VERSION: 0.9.2
|
||||
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: cache release ticket id
|
||||
shell: bash
|
||||
run: ./tea i ls --fields index,title --output simple | grep 'Release ${{ github.ref_name }}' | awk '{print $1}' > release-ticket-id
|
||||
|
||||
- name: comment & close
|
||||
shell: bash
|
||||
run: |
|
||||
./tea comment $(cat release-ticket-id) "Start tag"
|
||||
./tea issues close $(cat release-ticket-id)
|
Loading…
Add table
Add a link
Reference in a new issue