ci: stage release candidate source archive
Needs Infra to configure these secrets before merging.
This commit is contained in:
parent
aec4fafa49
commit
dde489ccc3
1 changed files with 93 additions and 0 deletions
93
.github/workflows/stage-release-candidate.yml
vendored
Normal file
93
.github/workflows/stage-release-candidate.yml
vendored
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
name: Stage release candidate
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
# Automating the step at https://github.com/apache/pekko-site/wiki/Pekko-Release-Process#build-the-source-release-candidate
|
||||
# Partly based on https://github.com/apache/daffodil/blob/main/.github/workflows/release-candidate.yml
|
||||
stage-release-candidate-to-svn:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Check version parameter
|
||||
run: |-
|
||||
if [[ "$REF" != *"-RC"* ]]; then
|
||||
echo "Trigger this workflow on an RC tag"
|
||||
exit 1
|
||||
fi
|
||||
export VERSION=$(echo $REF | sed -e "s/\(.*\)-.*/\\1/")
|
||||
echo "Version: $VERSION"
|
||||
echo "RC: $REF"
|
||||
env:
|
||||
REF: ${{ github.ref_name }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
persist-credentials: false
|
||||
|
||||
- name: Generate source dist
|
||||
run: |-
|
||||
VERSION=$(echo $REF | sed -e "s/\(.*\)-.*/\\1/")
|
||||
PREFIX=apache-pekko-$VERSION
|
||||
DATE=$(git log -n1 --format=%cs | tr -d -)
|
||||
TARBALL=$PREFIX-src-$DATE.tgz
|
||||
|
||||
mkdir dist
|
||||
echo git archive --format=tar.gz --output=dist/$TARBALL --prefix=$PREFIX/ HEAD
|
||||
echo $(git --version)
|
||||
git archive --format=tar.gz --output=dist/$TARBALL --prefix=$PREFIX/ HEAD
|
||||
cd dist
|
||||
sha512sum $TARBALL > $TARBALL.sha512
|
||||
env:
|
||||
REF: ${{ github.ref_name }}
|
||||
|
||||
- name: Sign source dist
|
||||
run: |-
|
||||
echo $PEKKO_GPG_SECRET_KEY | base64 -d | gpg --batch --import --import-options import-show
|
||||
gpg -ab dist/*.tgz
|
||||
env:
|
||||
PEKKO_GPG_SECRET_KEY: ${{ secrets.PEKKO_GPG_SECRET_KEY }}
|
||||
|
||||
- uses: actions/forgejo-release@v2.7.2
|
||||
with:
|
||||
direction: upload
|
||||
url: https://forge.engelen.eu
|
||||
repo: raboof/pekko
|
||||
release-dir: dist
|
||||
release-notes: "MY RELEASE NOTES"
|
||||
|
||||
- name: Upload source dist
|
||||
run: |-
|
||||
svn checkout https://dist.apache.org/repos/dist/dev/pekko dist
|
||||
cd dist
|
||||
mkdir $REF
|
||||
cp ../*.tgz* $REF
|
||||
svn add $REF $REF/*
|
||||
svn commit --username $PEKKO_SVN_DEV_USERNAME --password $PEKKO_SVN_DEV_PASSWORD --message "Stage Pekko $REF" $REF
|
||||
env:
|
||||
PEKKO_SVN_DEV_USERNAME: ${{ secrets.PEKKO_SVN_DEV_USERNAME }}
|
||||
PEKKO_SVN_DEV_PASSWORD: ${{ secrets.PEKKO_SVN_DEV_PASSWORD }}
|
||||
REF: ${{ github.ref_name }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue