mirror of
https://github.com/Guake/guake.git
synced 2025-10-26 11:27:13 +00:00
83 lines
2.4 KiB
YAML
83 lines
2.4 KiB
YAML
# .github/workflows/release.yml
|
|
|
|
name: Release
|
|
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '**'
|
|
|
|
|
|
jobs:
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Get tag
|
|
id: tag
|
|
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
|
|
|
- name: Set up Python 3.11
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: 3.11
|
|
|
|
- name: Checkout the current branch
|
|
run: |
|
|
echo "BRANCH=$(echo $GITHUB_REF | cut -d'/' -f 3)" >> $GITHUB_ENV
|
|
git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
|
|
git fetch --unshallow --tags
|
|
git tag
|
|
if [[ $(git rev-parse --abbrev-ref HEAD) == "master" ]]; then
|
|
echo "reattaching HEAD on master"
|
|
git symbolic-ref --short HEAD || git checkout -b ${GITHUB_ENV}-test $GITHUB_ENV
|
|
fi
|
|
|
|
sudo apt update -q
|
|
yes | sudo ./scripts/bootstrap-dev-debian.sh
|
|
./scripts/bootstrap-dev-pip.sh system
|
|
#sudo apt install --no-install-recommends -y xvfb gir1.2-gtk-3.0 python3-gi python3-gi-cairo gir1.2-wnck-3.0 gobject-introspection libgirepository1.0-dev
|
|
|
|
export DISPLAY=:99.0
|
|
|
|
- name: Set env
|
|
if: startsWith(github.ref, 'refs/tags')
|
|
run: echo "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_GUAKE=$(echo $GITHUB_REF_NAME)" >> $GITHUB_ENV
|
|
|
|
- name: Build
|
|
if: startsWith(github.ref, 'refs/tags')
|
|
run: |
|
|
echo "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_GUAKE=$SETUPTOOLS_SCM_PRETEND_VERSION_FOR_GUAKE"
|
|
set -e
|
|
mkdir test-rtd
|
|
virtualenv test-rtd
|
|
. ./test-rtd/bin/activate
|
|
pip install -r requirements-dev.txt
|
|
rm -rf test-rtd
|
|
|
|
# for dev
|
|
make dev-actions
|
|
pipenv run pip install pycairo pygobject
|
|
# check
|
|
make build
|
|
# prepare for deployment
|
|
make generate-paths
|
|
|
|
- name: Publish distribution 📦 to Test PyPI
|
|
uses: pypa/gh-action-pypi-publish@master
|
|
with:
|
|
verify_metadata: false
|
|
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
repository_url: https://test.pypi.org/legacy/
|
|
|
|
- name: Publish distribution 📦 to PyPI
|
|
if: startsWith(github.ref, 'refs/tags')
|
|
uses: pypa/gh-action-pypi-publish@master
|
|
with:
|
|
verify_metadata: false
|
|
password: ${{ secrets.PYPI_API_TOKEN }}
|