Skip to content

Commit

Permalink
Release
Browse files Browse the repository at this point in the history
  • Loading branch information
Jipok committed Feb 2, 2024
1 parent ff45d97 commit 47ce402
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and Release AppImage

on:
schedule:
- cron: '0 0 * * *' # Запуск каждый день в полночь UTC
- cron: '0 0 */3 * *' # Запуск каждые три дня в полночь UTC
workflow_dispatch: # Позволяет запустить вручную из GitHub UI

jobs:
Expand All @@ -26,14 +26,15 @@ jobs:
id: get_version
run: |
VERSION=$(ls moysklad/*.deb | grep -oP 'moysklad-kassa_\K([0-9.]+-\d+)(?=_amd64\.deb)')
echo $VERSION
mv out/* moysklad-kassa_${VERSION}.AppImage
echo "VERSION=$VERSION" >> $GITHUB_ENV
shell: bash

- name: Check if version already exists
id: check_version
run: |
wget -q "https://api.github.com/repos/Jipok/MoySklad-Kassa-AppImage/releases/tags/$VERSION" -O- > release_info.json
curl -s "https://api.github.com/repos/Jipok/MoySklad-Kassa-AppImage/releases/tags/v$VERSION" > release_info.json
if grep -q "Not Found" release_info.json; then
echo "RELEASE_EXISTS=false" >> $GITHUB_ENV
else
Expand All @@ -47,8 +48,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ env.VERSION }}
tag_name: v${{ env.VERSION }}
release_name: Version ${{ env.VERSION }}
draft: false
prerelease: false

Expand All @@ -62,3 +63,4 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./moysklad-kassa_${{ env.VERSION }}.AppImage
asset_name: moysklad-kassa_${{ env.VERSION }}.AppImage
asset_content_type: application/octet-stream
1 change: 1 addition & 0 deletions recipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ingredients:
- deb https://downloads.moysklad.ru/pos/linux/deb stable non-free
script:
- awk -i inplace 'BEGIN { RS = ""; FS = "\n" } !/Package: libgdk-pixbuf2.0-0/ { print $0 "\n" }' status
- awk -i inplace 'BEGIN { RS = ""; FS = "\n" } !/Package: libpango/ { print $0 "\n" }' status
- awk -i inplace 'BEGIN { RS = ""; FS = "\n" } !/Package: libcairo2/ { print $0 "\n" }' status
- awk -i inplace 'BEGIN { RS = ""; FS = "\n" } !/Package: libgtk/ { print $0 "\n" }' status
- awk -i inplace 'BEGIN { RS = ""; FS = "\n" } !/Package: libgdk/ { print $0 "\n" }' status
Expand Down

0 comments on commit 47ce402

Please sign in to comment.