remove set-output #7
Workflow file for this run
This file contains 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: Build and Publish Debian Package | |
on: | |
push: | |
branches: | |
- feature/package-action | |
workflow_dispatch: | |
jobs: | |
build-debian-package: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Login to GHCR | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build Docker image | |
run: | | |
docker build -t webx-engine-builder -f docker/Dockerfile.ubuntu . | |
- name: Extract Debian package | |
id: docker_build | |
run: | | |
CONTAINER_ID=$(docker create webx-engine-builder) | |
docker cp $CONTAINER_ID:/app/target/ubuntu/. ./debian-package | |
docker cp $CONTAINER_ID:/app/VERSION ./debian-package | |
docker rm -f $CONTAINER_ID | |
PACKAGE_VERSION=$(cat ./debian-package/VERSION) | |
mv ./debian-package/webx-engine_${PACKAGE_VERSION}_amd64.deb ./debian-package/webx-engine_${PACKAGE_VERSION}_ubuntu_22.04_amd64.deb | |
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV | |
- name: Upload Debian package to GHCR | |
uses: actions/upload-artifact@v3 | |
with: | |
name: debian-package | |
path: ./debian-package/ | |
- name: Upload Debian package as Release asset | |
if: github.event_name == 'workflow_dispatch' | |
uses: ncipollo/release-action@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: debian-package/*.deb | |
tag: ${{ env.PACKAGE_VERSION }} | |
name: "WebX Engine Debian Packages" | |
body: "Automatically built and uploaded Debian packages for release ${{ env.PACKAGE_VERSION }}." |