Skip to content

new-release

new-release #100

Workflow file for this run

name: Generate
on:
push:
branches-ignore:
- 'gh-pages'
repository_dispatch:
jobs:
generate:
name: Generate Repository
runs-on: ubuntu-latest
steps:
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v3
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Checkout Silica
uses: actions/checkout@v2
with:
repository: osy/Silica
- name: Checkout Template
uses: actions/checkout@v2
with:
path: template
- name: Merge Template
run: rsync -a template/ .
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Generate index.json
run: npx silica-package-github --config Packages/UTM/silica_data/index.template.json > Packages/UTM/silica_data/index.json
- name: Setup Silica
run: pip3 install -r requirements.txt
- name: Generate website
run: python3 index.py
- name: Generate releases
run: |
mkdir pkg
wget -O pkg/UTM.deb ${DOWNLOAD_PATH}
rm -rf ./docs/pkg ./docs/Packages* ./docs/Release
apt-ftparchive packages pkg > Packages.txt
cat Packages.txt | bzip2 -c > ./docs/Packages.bz2
cat Packages.txt | xz -c > ./docs/Packages.xz
mv Packages.txt ./docs/Packages
cat > release.conf <<BLOCK
APT::FTPArchive::Release::Origin "UTM";
APT::FTPArchive::Release::Label "UTM";
APT::FTPArchive::Release::Suite "stable";
APT::FTPArchive::Release::Version "1.0";
APT::FTPArchive::Release::Architectures "iphoneos-arm";
APT::FTPArchive::Release::Codename "ios";
APT::FTPArchive::Release::Components "main";
APT::FTPArchive::Release::Description "Virtual machines for iOS";
BLOCK
apt-ftparchive release -c release.conf ./docs > Release.txt
gpg --default-key ${KEYNAME} -abs -o ./docs/Release.gpg Release.txt
gpg --default-key ${KEYNAME} --clearsign -o ./docs/InRelease Release.txt
mv Release.txt ./docs/Release
env:
DOWNLOAD_PATH: https://github.com/utmapp/UTM/releases/latest/download/UTM.deb
KEYNAME: [email protected]
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
publish_branch: gh-pages
commit_message: 'Update repository'