2023-06-14 17:02:20 +05:30
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
#
|
|
|
|
# See also https://forgejo.org/docs/next/developer/RELEASE/#release-process
|
|
|
|
#
|
|
|
|
# https://codeberg.org/forgejo-experimental/forgejo
|
|
|
|
#
|
|
|
|
# Copies a release from codeberg.org/forgejo-integration to codeberg.org/forgejo-experimental
|
|
|
|
#
|
2023-12-28 21:53:09 +05:30
|
|
|
# vars.ROLE: forgejo-experimental
|
|
|
|
# vars.FORGEJO: https://codeberg.org
|
|
|
|
# vars.FROM_OWNER: forgejo-integration
|
|
|
|
# vars.TO_OWNER: forgejo-experimental
|
|
|
|
# vars.REPO: forgejo
|
|
|
|
# vars.DOER: forgejo-experimental-ci
|
|
|
|
# secrets.TOKEN: <generated from codeberg.org/forgejo-experimental-ci>
|
2023-06-14 17:02:20 +05:30
|
|
|
#
|
2023-12-28 21:53:09 +05:30
|
|
|
# http://private.forgejo.org/forgejo/forgejo
|
2023-06-14 17:02:20 +05:30
|
|
|
#
|
|
|
|
# Copies & sign a release from codeberg.org/forgejo-integration to codeberg.org/forgejo
|
|
|
|
#
|
2023-12-28 21:53:09 +05:30
|
|
|
# vars.ROLE: forgejo-release
|
|
|
|
# vars.FORGEJO: https://codeberg.org
|
|
|
|
# vars.FROM_OWNER: forgejo-integration
|
|
|
|
# vars.TO_OWNER: forgejo
|
|
|
|
# vars.REPO: forgejo
|
|
|
|
# vars.DOER: release-team
|
|
|
|
# secrets.TOKEN: <generated from codeberg.org/release-team>
|
|
|
|
# secrets.GPG_PRIVATE_KEY: <XYZ>
|
|
|
|
# secrets.GPG_PASSPHRASE: <ABC>
|
2023-06-14 17:02:20 +05:30
|
|
|
#
|
|
|
|
name: Pubish release
|
|
|
|
|
2023-12-19 20:05:06 +05:30
|
|
|
on:
|
2023-06-14 17:02:20 +05:30
|
|
|
push:
|
|
|
|
tags: 'v*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
runs-on: self-hosted
|
2023-12-28 21:53:09 +05:30
|
|
|
if: vars.DOER != '' && vars.FORGEJO != '' && vars.TO_OWNER != '' && vars.FROM_OWNER != '' && secrets.TOKEN != ''
|
2023-06-14 17:02:20 +05:30
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
2023-12-28 21:53:09 +05:30
|
|
|
- name: copy & sign
|
2024-03-02 15:09:25 +05:30
|
|
|
uses: https://code.forgejo.org/forgejo/forgejo-build-publish/publish@v4
|
2023-06-14 17:02:20 +05:30
|
|
|
with:
|
2024-03-02 15:09:25 +05:30
|
|
|
from-forgejo: ${{ vars.FORGEJO }}
|
|
|
|
to-forgejo: ${{ vars.FORGEJO }}
|
2023-12-28 21:53:09 +05:30
|
|
|
from-owner: ${{ vars.FROM_OWNER }}
|
|
|
|
to-owner: ${{ vars.TO_OWNER }}
|
|
|
|
repo: ${{ vars.REPO }}
|
|
|
|
release-notes: "See https://codeberg.org/forgejo/forgejo/src/branch/forgejo/RELEASE-NOTES.md#{ANCHOR}"
|
2024-03-02 15:09:25 +05:30
|
|
|
ref-name: ${{ github.ref_name }}
|
|
|
|
sha: ${{ github.sha }}
|
|
|
|
from-token: ${{ secrets.TOKEN }}
|
|
|
|
to-doer: ${{ vars.DOER }}
|
|
|
|
to-token: ${{ secrets.TOKEN }}
|
2023-06-14 17:02:20 +05:30
|
|
|
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
|
|
|
|
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
2023-12-28 21:53:09 +05:30
|
|
|
verbose: ${{ vars.VERBOSE }}
|
2023-08-21 20:08:29 +05:30
|
|
|
|
|
|
|
|
|
|
|
- name: set up go for the DNS update below
|
2023-12-28 21:53:09 +05:30
|
|
|
if: vars.ROLE == 'forgejo-experimental' && secrets.OVH_APP_KEY != ''
|
2023-08-21 20:08:29 +05:30
|
|
|
uses: https://code.forgejo.org/actions/setup-go@v4
|
|
|
|
with:
|
2024-04-05 09:01:00 +05:30
|
|
|
go-version: "1.22"
|
2023-08-21 20:08:29 +05:30
|
|
|
check-latest: true
|
|
|
|
- name: update the _release.experimental DNS record
|
2023-12-28 21:53:09 +05:30
|
|
|
if: vars.ROLE == 'forgejo-experimental' && secrets.OVH_APP_KEY != ''
|
2023-08-21 20:08:29 +05:30
|
|
|
uses: https://code.forgejo.org/actions/ovh-dns-update@v1
|
|
|
|
with:
|
|
|
|
subdomain: _release.experimental
|
|
|
|
domain: forgejo.com # there is a CNAME from .org to .com (for security reasons)
|
|
|
|
record-id: 5283602601
|
|
|
|
value: v=${{ github.ref_name }}
|
|
|
|
ovh-app-key: ${{ secrets.OVH_APP_KEY }}
|
|
|
|
ovh-app-secret: ${{ secrets.OVH_APP_SECRET }}
|
|
|
|
ovh-consumer-key: ${{ secrets.OVH_CON_KEY }}
|