From b6c8c9ce9640922a30e6b5e891758c8ef1ecca8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9D=93=99=F0=9D=93=BE=F0=9D=93=B5=F0=9D=93=B2?= =?UTF-8?q?=F0=9D=93=B8?= Date: Sun, 1 Sep 2024 06:04:42 +0200 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f948101..b98a3a2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,5 @@ name: Build and Publish NGINX + on: push: branches: @@ -6,27 +7,32 @@ on: pull_request: branches: - main + jobs: build: runs-on: ubuntu-22.04 steps: - name: Checkout repository uses: actions/checkout@v3 + - name: Install dependencies run: | sudo apt-get update sudo apt-get -y install git dpkg-dev + - name: Clone the repository run: | cd $HOME git clone https://github.com/theraw/The-World-Is-Yours.git cd The-World-Is-Yours/ + - name: Build NGINX run: | cd $HOME/The-World-Is-Yours/ sudo bash build/run.sh new sudo bash build/run.sh build sudo bash build/run.sh postfix + - name: Build .deb Package run: | cd $HOME/The-World-Is-Yours/ @@ -79,8 +85,11 @@ jobs: mv ${PKG_DIR}.deb /opt/${PKG_NAME}_${VERSION}_${ARCH}.deb echo "Debian package created at /opt/${PKG_NAME}_${VERSION}_${ARCH}.deb" }; create_deb' - - name: Upload .deb Package as Artifact - uses: actions/upload-artifact@v3 + + - name: Upload .deb Package as Release Asset + uses: softprops/action-gh-release@v1 with: - name: twiy-nginx-deb - path: /opt/*.deb + files: /opt/*.deb + env: + GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} + RELEASE_TAG: v${{ steps.build.outputs.VERSION }}