mirror of https://github.com/xemu-project/xemu.git
ci: Sync master source to ppa-snapshot branch
This commit is contained in:
parent
aa149a583a
commit
2ddc2f4d49
|
@ -257,25 +257,43 @@ jobs:
|
||||||
asset_name: xemu-macos-debug.zip
|
asset_name: xemu-macos-debug.zip
|
||||||
asset_path: dist/xemu-macos-debug.zip
|
asset_path: dist/xemu-macos-debug.zip
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
- name: Upload Release Assets (Ubuntu Release Build)
|
|
||||||
|
# Sync archive version of source (including submodule code) to the
|
||||||
|
# ppa-snapshot branch to work around limitations of the Launchpad platform,
|
||||||
|
# namely: no network egress on package build, no custom scripting in source
|
||||||
|
# package creation.
|
||||||
|
PushToPPA:
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||||
id: upload-release-asset-ubuntu-release
|
# needs: [Ubuntu, Windows, macOS]
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
needs: Init
|
||||||
env:
|
runs-on: ubuntu-latest
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
steps:
|
||||||
|
- name: Clone Tree
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Clone Tree (Unshallow)
|
||||||
|
run: |
|
||||||
|
git fetch --prune --unshallow --tags
|
||||||
|
- name: Create Source Archive
|
||||||
|
run: |
|
||||||
|
./scripts/archive-source.sh archive.tgz
|
||||||
|
mkdir archive
|
||||||
|
pushd archive
|
||||||
|
tar xf ../archive.tgz
|
||||||
|
popd
|
||||||
|
- name: Integrate Debian Packaging
|
||||||
|
run: |
|
||||||
|
# Clone deb branch containing packaging files
|
||||||
|
git clone --branch=deb --depth=1 https://github.com/mborgerson/xemu.git /tmp/xemu-debian
|
||||||
|
mv /tmp/xemu-debian/debian archive
|
||||||
|
|
||||||
|
# Create changelog containing current version
|
||||||
|
echo -e "xemu (1:$(cat archive/XEMU_VERSION)-0) unstable; urgency=medium\n" > archive/debian/changelog
|
||||||
|
echo -e " Built from $(cat archive/XEMU_VERSION)\n" >> archive/debian/changelog
|
||||||
|
echo " -- Matt Borgerson <contact@mborgerson.com> $(date -R)" >> archive/debian/changelog
|
||||||
|
- name: Deploy Source Archive to Branch
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
asset_name: xemu-ubuntu-release.tgz
|
publish_dir: ./archive
|
||||||
asset_path: dist/xemu-ubuntu-release.tgz
|
publish_branch: ppa-snapshot
|
||||||
asset_content_type: application/gzip
|
force_orphan: true
|
||||||
- name: Upload Release Assets (Ubuntu Debug Build)
|
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
|
||||||
id: upload-release-asset-ubuntu-debug
|
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_name: xemu-ubuntu-debug.tgz
|
|
||||||
asset_path: dist/xemu-ubuntu-debug.tgz
|
|
||||||
asset_content_type: application/gzip
|
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -512,7 +512,9 @@ XEMU_BRANCH := $(shell \
|
||||||
XEMU_VERSION := $(shell \
|
XEMU_VERSION := $(shell \
|
||||||
cd $(SRC_PATH); \
|
cd $(SRC_PATH); \
|
||||||
if test -e .git; then \
|
if test -e .git; then \
|
||||||
git describe --match 'xemu-v*' | cut -c 6- | tr -d '\n'; \
|
git describe --match 'xemu-v*' | cut -c 7- | tr -d '\n'; \
|
||||||
|
elif test -e XEMU_VERSION; then \
|
||||||
|
cat XEMU_VERSION; \
|
||||||
fi)
|
fi)
|
||||||
|
|
||||||
xemu-version.c: FORCE
|
xemu-version.c: FORCE
|
||||||
|
|
|
@ -69,4 +69,10 @@ for sm in $submodules; do
|
||||||
tar --concatenate --file "$tar_file" "$sub_file"
|
tar --concatenate --file "$tar_file" "$sub_file"
|
||||||
test $? -ne 0 && error "failed append submodule $sm to $tar_file"
|
test $? -ne 0 && error "failed append submodule $sm to $tar_file"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
git rev-parse HEAD 2>/dev/null | tr -d '\n' > XEMU_COMMIT
|
||||||
|
git symbolic-ref --short HEAD > XEMU_BRANCH
|
||||||
|
git describe --match 'xemu-v*' | cut -c 7- | tr -d '\n' > XEMU_VERSION
|
||||||
|
tar -r --file "$tar_file" XEMU_COMMIT XEMU_BRANCH XEMU_VERSION
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue