Release #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y dpkg-dev gnupg | |
| - name: Import GPG private key | |
| run: | | |
| echo "$GPG_PRIVATE_KEY" | gpg --batch --import | |
| echo "GPG key list:" | |
| gpg --list-secret-keys | |
| env: | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| - name: Build Packages & Sign Release | |
| run: | | |
| set -e | |
| set -v | |
| export KEYNAME=${KEYNAME} | |
| dpkg-scanpackages --multiversion . > Packages | |
| gzip -fk Packages | |
| bzip2 -fk Packages | |
| xz -fk Packages | |
| apt-ftparchive release . > Release | |
| gpg --batch --yes --pinentry-mode loopback \ | |
| --passphrase "$GPG_PASSPHRASE" \ | |
| --default-key "$KEYNAME" \ | |
| -abs -o Release.gpg Release | |
| gpg --batch --yes --pinentry-mode loopback \ | |
| --passphrase "$GPG_PASSPHRASE" \ | |
| --default-key "$KEYNAME" \ | |
| --clearsign -o InRelease Release | |
| env: | |
| KEYNAME: ${{ secrets.GPG_KEYNAME }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| - name: Setup Git identity | |
| run: | | |
| git config --global user.name "dopaemon" | |
| git config --global user.email "polarisdp@gmail.com" | |
| - name: Commit and push changes | |
| uses: devops-infra/action-commit-push@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| commit_message: "PPA: Update PPA Package" | |
| pages-directory-listing: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| name: Directory Listings Index | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| - name: Clean Folder | |
| run: | |
| rm -rf ./.git | |
| rm -rf ./.github | |
| - name: Generate Directory Listings | |
| uses: jayanta525/github-pages-directory-listing@v4.0.0 | |
| with: | |
| FOLDER: ./ | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3.0.1 | |
| with: | |
| path: ./ | |
| deploy: | |
| needs: pages-directory-listing | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4.0.0 |