6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-11-16 18:15:09 +00:00
tutor/.github/workflows/release.yml
Régis Behmo 13382c889b ci: attempt to fix github release CI
Github release CI was running on ubuntu 18.04 withh python 3.6.
Installing tomli==2.0.1, which is required in dev, triggers a failure in
python 3.6 because it is no longer available.
2022-04-24 12:50:34 +02:00

77 lines
2.4 KiB
YAML

name: Release
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
locale: C.UTF-8
- os: macos-10.15
locale: en_US.UTF-8
env:
LC_ALL: ${{ matrix.locale }}
LANG: ${{ matrix.locale }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Upgrade pip
run: python -m pip install --upgrade pip setuptools==44.0.0
- name: Print info about the current python installation
run: make ci-info
- name: Install requirements
run: make bootstrap-dev-plugins
- name: Run tests
run: make tests
- name: Create bundle
run: make bundle
- name: Test bundle
run: make ci-test-bundle
- name: Get release description
id: release-description
# We must escape multi-line string, as per:
# https://medium.com/agorapulse-stories/how-to-work-with-multiline-string-variables-in-github-actions-23f56447d209
run: |
make release-description
cat release_description.md
description="$(cat release_description.md)"
description="${description//'%'/'%25'}"
description="${description//$'\n'/'%0A'}"
description="${description//$'\r'/'%0D'}"
echo "::echo::on"
echo "::set-output name=text::$description"
echo "::echo::off"
shell: bash
- name: Get release file name
id: release-file
run: |
echo "::echo::on"
echo "::set-output name=filename::tutor-$(uname -s)_$(uname -m)"
echo "::echo::off"
shell: bash
- name: Get release name
id: release-name
run: |
echo "::echo::on"
echo "::set-output name=release::${{ github.ref }}"
echo "::echo::off"
- name: Upload bundle
# https://github.com/marketplace/actions/upload-files-to-a-github-release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./dist/tutor
asset_name: "${{ steps.release-file.outputs.filename }}"
tag: "${{ steps.release-name.outputs.release }}"
overwrite: true
body: "${{ steps.release-description.outputs.text }}"