Skip to content

make release

make release #24

Workflow file for this run

name: make release
on:
workflow_dispatch:
inputs:
type:
description: 'Release type'
required: true
default: 'patch'
type: choice
options:
- patch
- release
message:
description: 'Release message for patch, will be added to debian/changelog'
required: false
type: string
env:
MYCI_GIT_PASSWORD: ${{ secrets.MYCI_GIT_PASSWORD }}
DEBEMAIL: ${{ vars.DEBEMAIL }}
DEBFULLNAME: ${{ vars.DEBFULLNAME }}
jobs:
release:
runs-on: ubuntu-latest
name: make ${{ inputs.type }}
strategy:
fail-fast: true
matrix:
include:
- {os: debian, codename: bookworm, image_owner: }
container: ${{ matrix.image_owner }}${{ matrix.os }}:${{ matrix.codename }}
steps:
- name: error if not main branch
if: github.ref != 'refs/heads/main'
run: exit 1
- name: check patch inputs
if: ${{ inputs.type == 'patch' }}
run: |
if [ -z "${{ inputs.message }}" ]; then
echo "ERROR: message is empty! For releasing a patch a message is required"
exit 1
fi
- name: install ci tools
run: |
apt --quiet update --yes
apt --quiet install --yes make git devscripts
- name: git clone
uses: myci-actions/checkout@master
with:
submodules: true
- name: set git identity
run: |
git config user.email $DEBEMAIL
git config user.name "$DEBFULLNAME"
- name: checkout main branch
run: git checkout main
- name: install myci
run: make install
- name: patch
if: ${{ inputs.type == 'patch' }}
run: |
myci-release-patch.sh "${{ inputs.message }}"
- name: release
if: ${{ inputs.type == 'release' }}
run: |
myci-release.sh