Skip to content

chore: bump modparks-cli version to 0.1.4 #22

chore: bump modparks-cli version to 0.1.4

chore: bump modparks-cli version to 0.1.4 #22

Workflow file for this run

name: Update APT Repository
on:
release:
types: [published]
jobs:
update-apt:
runs-on: ubuntu-latest
steps:
- name: Checkout APT repository
uses: actions/checkout@v4
with:
repository: Pitan76/apt-repo
# Pitan76/apt-repo へ Push するための Personal Access Token を secrets に設定してください
token: ${{ secrets.APT_REPO_PAT }}
- name: Download Deb from latest release
run: |
mkdir -p pool/main/m/modparks-cli
wget -q https://github.com/${{ github.repository }}/releases/download/${{ github.event.release.tag_name }}/modparks-cli-${{ github.event.release.tag_name }}-ubuntu-x86_64.deb -P pool/main/m/modparks-cli/ || true
- name: Generate Packages and Release files
run: |
sudo apt-get update
sudo apt-get install -y dpkg-dev apt-utils
mkdir -p dists/stable/main/binary-amd64
cd dists/stable/main/binary-amd64
dpkg-scanpackages --multiversion ../../../../pool/main/m/modparks-cli /dev/null > Packages
gzip -k -f Packages
cd ../../../..
# Release file generation
cat <<EOF > dists/stable/Release
Origin: Pitan76
Label: Pitan76 APT Repository
Suite: stable
Codename: stable
Architectures: amd64
Components: main
Description: Pitan76 APT Repository
Date: $(date -Ru)
EOF

Check failure on line 44 in .github/workflows/apt-repo.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/apt-repo.yml

Invalid workflow file

You have an error in your yaml syntax on line 44
cd dists/stable
apt-ftparchive release . >> Release
cd ../..
- name: Import GPG Key and Sign Release
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: |
# 秘密鍵をインポート
echo "$GPG_PRIVATE_KEY" | gpg --batch --import
cd dists/stable
rm -f Release.gpg InRelease
# バイナリ署名 (Release.gpg)
gpg --batch --yes --default-key admin@pitan76.net -abs -o Release.gpg Release
# クリアテキスト署名 (InRelease)
gpg --batch --yes --default-key admin@pitan76.net --clearsign -o InRelease Release
cd ../..
- name: Commit and Push changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Update APT repository for ${{ github.event.release.tag_name }}" || echo "No changes to commit"
# Pitan76/apt-repo のデフォルトブランチ(main)に Push します
git push origin HEAD:main