Skip to content

Release triggered by pvshvp-oss #45

Release triggered by pvshvp-oss

Release triggered by pvshvp-oss #45

Workflow file for this run

name: πŸŽ‰ Release
run-name: Release triggered by ${{ github.actor }}
on:
workflow_dispatch:
workflow_call:
push:
tags:
- "v**"
jobs:
build:
name: πŸ— Build
runs-on: ubuntu-latest
container:
image: rebornos/rebornos:latest
ports:
- 80
steps:
- name: πŸ‹ Initialize RebornOS Docker Container
id: init_docker_step
run: sh /usr/bin/init-rebornos-docker.sh
- name: 🎟 Checkout Git Repository
id: checkout_repository_step
uses: actions/checkout@v3
- name: πŸ›  Build Package
id: build_package_step
run: |
chown -R rebornos packaging
chmod -R +x packaging
sudo -u rebornos sh -c "packaging/build_package.sh stable --noconfirm"
- name: ⬆ Upload Package Artifact
id: upload_package_step
uses: actions/upload-artifact@v3
with:
name: Stable Package
path: packaging/${{ github.event.repository.name }}/${{ github.event.repository.name }}*.pkg.tar.*
if-no-files-found: error
release:
needs: build
name: πŸŽ‰ Release
runs-on: ubuntu-latest
steps:
- name: 🎟 Checkout Git Repository
id: checkout_repository_step
uses: actions/checkout@v3
- name: 🏷 Determine Tags and Versions
id: set_versions_step
run: |
git fetch --prune --unshallow --tags -f
LATEST_TAG="$(git tag | grep -v -P '^v([0-9]+)\.([0-9]+)\.([0-9]+).*\.' | grep -v -P '^v([0-9]+)\.([0-9]+)\.([0-9]+).*\.' | grep -v -P '^v([0-9]+)\.([0-9]+)\.([0-9]+)_$' | sort --version-sort | tail -n1)"
GIT_VERSION="$(git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)")"
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
echo "GIT_VERSION=$GIT_VERSION" >> $GITHUB_ENV
echo "LATEST_TAG=$LATEST_TAG"
echo "GIT_VERSION=$GIT_VERSION"
- name: ⬇ Download Package Artifact
id: download_package_step
uses: actions/download-artifact@v3
with:
name: Stable Package
path: output
- name: πŸ–© Generate CheckSum
id: generate_checksum_step
run: |
cd ${{ steps.download_package_step.outputs.download-path }}
find . -type f -exec sh -c 'md5sum "$0 > $0.md5sum' {} \;
- name: πŸŽ‰ Create Release
id: create_release_step
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: false
fail_on_unmatched_files: true
generate_release_notes: false
append_body: false
body_path: CHANGELOG.md
tag_name: ${{ env.LATEST_TAG }}
name: ${{ env.LATEST_TAG }}
files: |
${{ steps.download_package_step.outputs.download-path }}/**${{ github.event.repository.name }}*.pkg.tar*