diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7876cf4..6057f65 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,11 @@ on: repository_dispatch: types: [run_build] +permissions: + contents: read + pages: write + id-token: write + jobs: prepare_jobs: runs-on: ubuntu-latest @@ -51,7 +56,7 @@ jobs: name: artifact-${{ env.PACKAGE }} path: ${{ env.PACKAGE }}/*.pkg.tar.gz - create_release: + package_repo: if: contains(github.ref,'refs/heads/master') needs: [prepare_jobs, build] runs-on: ubuntu-latest @@ -59,32 +64,41 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 - - name: Install dependencies - run: | - apk --update add build-base bash gpgme-dev libarchive-tools libarchive-dev libtool doxygen libcrypto3 + - name: Download artifacts + uses: actions/download-artifact@v4 - name: Create repo files - if: contains(github.ref,'refs/heads/master') run: | - mkdir package - cp artifact-*/*.pkg.tar.gz package/ - cd package + mkdir repo + cp artifact-*/*.pkg.tar.gz repo/ + cd repo ${PSPDEV}/share/pacman/bin/repo-add pspdev.db.tar.gz *.pkg.tar.gz - - name: Upload files - if: contains(github.ref,'refs/heads/master') - uses: svenstaro/upload-release-action@v2 + mv pspdev.db.tar.gz pspdev.db + mv pspdev.files.tar.gz pspdev.files + tar -cvf ../repo.tar ./* + - name: Upload repo artifact + uses: actions/upload-artifact@v4 with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: package/* - overwrite: true - file_glob: true - tag: ${{ github.ref }}-${{ github.run_id }} - release_name: ${{ github.ref }} (${{ github.run_id }}) + name: github-pages + path: repo.tar + + publish_repo: + if: contains(github.ref,'refs/heads/master') + needs: [package_repo] + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 docker-layer: if: contains(github.ref,'refs/heads/master') - needs: [create_release] - + needs: [publish_repo] runs-on: ubuntu-latest steps: