From 36d26f54b9f60818ab80bb222ef0a583528d2454 Mon Sep 17 00:00:00 2001 From: loathingKernel <142770+loathingKernel@users.noreply.github.com> Date: Sat, 17 Sep 2022 17:52:39 +0300 Subject: [PATCH] workflows: Update `action` versions and use common titles for steps --- .github/workflows/release-tests.yml | 34 ++++++++++++----------------- .github/workflows/release.yml | 34 ++++++++++------------------- 2 files changed, 25 insertions(+), 43 deletions(-) diff --git a/.github/workflows/release-tests.yml b/.github/workflows/release-tests.yml index 3c7e9d71..4b9f4a6f 100644 --- a/.github/workflows/release-tests.yml +++ b/.github/workflows/release-tests.yml @@ -1,5 +1,5 @@ -name: "Release Tests" +name: "Development Snapshot" on: @@ -22,8 +22,8 @@ jobs: id: version shell: bash run: | - tag_abbrev=$(git describe --tags --abbrev=0) - echo "::set-output name=tag_abbrev::${tag_abbrev%%-rc*}" + tag_abbrev=$(git tag | sort -h | grep -oE "(^[0-9]+\.[0-9]+(.[0-9])?)$" | tail -1) + echo "::set-output name=tag_abbrev::$tag_abbrev" echo "::set-output name=tag_offset::$(git rev-list $tag_abbrev..HEAD --count)" echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" echo "::set-output name=full_desc::$(git describe --long --tags)" @@ -38,7 +38,7 @@ jobs: echo 'deb [signed-by=/usr/share/keyrings/makedeb-archive-keyring.gpg arch=all] https://proget.hunterwittenborn.com/ makedeb main' | sudo tee /etc/apt/sources.list.d/makedeb.list sudo apt update sudo apt install makedeb - - name: prepare source directory + - name: Prepare source directory run: | git clone https://mpr.hunterwittenborn.com/rare.git build sed -i 's/source=.*/source=("rare-test::git+$url")/g' build/PKGBUILD @@ -61,23 +61,23 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - name: install Deps + - name: Install build dependencies run: | sudo apt update sudo apt install python3 python3-pip python3-setuptools patchelf desktop-file-utils libgdk-pixbuf2.0-dev fakeroot strace fuse - - name: install appimage-builder + - name: Install appimage-builder run: | sudo wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool sudo chmod +x /usr/local/bin/appimagetool sudo pip3 install appimage-builder - - name: Build Appimage + - name: Build run: | cp rare/__main__.py . appimage-builder --skip-test mv Rare-*.AppImage Rare.AppImage - name: Upload to Artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: Rare.AppImage path: Rare.AppImage @@ -165,22 +165,17 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v3 - with: - submodules: true - - uses: actions/setup-python@v4 with: python-version: '3.9' - - - name: Pip Dependencies + - name: Install Build Dependencies + run: pip install pyinstaller + - name: Install Target Dependencies run: | pip install -r requirements.txt - pip install pyinstaller - - - name: copy files + - name: Move files run: mv rare/__main__.py __main__.py - - - name: run pyinstaller + - name: Build run: >- pyinstaller -F --name Rare --add-data "rare/resources/languages/*:rare/resources/languages" @@ -189,8 +184,7 @@ jobs: --icon rare/resources/images/Rare.icns --hidden-import=legendary __main__.py - - - name: create dmg + - name: Create dmg run: | git clone https://github.com/create-dmg/create-dmg create-dmg/create-dmg Rare-${{github.ref}}.dmg dist/Rare.App --volname Rare --volicon rare/resources/images/Rare.icns diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b8e083ce..467af403 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: echo 'deb [signed-by=/usr/share/keyrings/makedeb-archive-keyring.gpg arch=all] https://proget.hunterwittenborn.com/ makedeb main' | sudo tee /etc/apt/sources.list.d/makedeb.list sudo apt update sudo apt install makedeb - - name: prepare pkgbuild + - name: Prepare source directory run: | git clone https://mpr.hunterwittenborn.com/rare.git build sed -i "s/pkgver=.*/pkgver=${{ github.event.release.tag_name }}/g" build/PKGBUILD @@ -63,19 +63,17 @@ jobs: appimage: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 - with: - submodules: true - - name: install Deps + - uses: actions/checkout@v3 + - name: Install build dependencies run: | sudo apt update sudo apt install python3 python3-pip python3-setuptools patchelf desktop-file-utils libgdk-pixbuf2.0-dev fakeroot strace fuse - - name: install appimage-builder + - name: Install appimage-builder run: | sudo wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool sudo chmod +x /usr/local/bin/appimagetool sudo pip3 install appimage-builder - - name: Build Appimage + - name: Build run: | cp rare/__main__.py . appimage-builder --skip-test @@ -103,8 +101,6 @@ jobs: runs-on: "windows-latest" steps: - uses: actions/checkout@v3 - with: - fetch-depth: 0 - uses: actions/setup-python@v4 with: python-version: '3.9' @@ -162,8 +158,6 @@ jobs: runs-on: "windows-latest" steps: - uses: actions/checkout@v3 - with: - fetch-depth: 0 - uses: actions/setup-python@v4 with: python-version: '3.9' @@ -192,22 +186,17 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v3 - with: - submodules: true - - uses: actions/setup-python@v4 with: python-version: '3.9' - - - name: Pip Dependencies + - name: Install Build Dependencies + run: pip install pyinstaller + - name: Install Target Dependencies run: | pip install -r requirements.txt - pip install pyinstaller - - - name: copy files + - name: Move files run: mv rare/__main__.py __main__.py - - - name: run pyinstaller + - name: Build run: >- pyinstaller -F --name Rare --add-data "rare/resources/languages/*:rare/resources/languages" @@ -216,8 +205,7 @@ jobs: --icon rare/resources/images/Rare.icns --hidden-import=legendary __main__.py - - - name: create dmg + - name: Create dmg run: | git clone https://github.com/create-dmg/create-dmg create-dmg/create-dmg Rare.dmg dist/Rare.App --volname Rare --volicon rare/resources/images/Rare.icns