Build release packages #44
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 release packages | |
on: | |
push: | |
tags: | |
- '*' | |
workflow_dispatch: | |
jobs: | |
pkg-ubuntu: | |
name: Package for Ubuntu | |
strategy: | |
matrix: | |
include: | |
- { os: ubuntu-22.04 } | |
- { os: ubuntu-24.04 } | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Get version | |
id: version | |
run: | | |
vers=$(sed -n '1s/AC_INIT(\[.*\], \[\([0-9\.]*\).*\].*/\1/p' configure.ac) | |
echo "VERSION=$vers" >> $GITHUB_ENV | |
- name: Build Debian package | |
run: | | |
ln -s contrib/debian debian | |
sed -i 's/nvc (.*)/nvc (${{ env.VERSION }}-1)/' debian/changelog | |
sudo apt-get -y build-dep . | |
dpkg-buildpackage -uc -us -b | |
mv ../nvc_${{ env.VERSION }}-1_amd64.deb nvc_${{ env.VERSION }}-1_amd64_${{ matrix.os }}.deb | |
- name: 'Upload artifact' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: '${{matrix.os}} package' | |
path: nvc_${{ env.VERSION }}-1_amd64_${{ matrix.os }}.deb | |
msi-installer: | |
name: Windows installer | |
runs-on: windows-2022 | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Build MSI installer | |
uses: ./.github/actions/windows-installer | |
docker: | |
name: Docker image | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Build Docker image | |
run: ./contrib/docker/build.sh | |
- name: Push to ghcr.io | |
run : | | |
echo "${{ secrets.GHCR_TOKEN }}" | docker login -u ${{ vars.GHCR_USER }} --password-stdin | |
docker image tag ghdl:current ${{ steps.build.outputs.ghdl_image }} | |
docker push ghcr.io/nickg/nvc:latest |