diff --git a/.github/workflows/ubuntu_release.yml b/.github/workflows/ubuntu_release.yml new file mode 100644 index 0000000..7e8216c --- /dev/null +++ b/.github/workflows/ubuntu_release.yml @@ -0,0 +1,48 @@ +name: Ubuntu release + +on: + push: + tags: + - '*' + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + env: + CC: gcc + steps: + - uses: actions/checkout@v4 + + - name: Install stuff for creating packages + run: sudo apt install -y fakeroot rpm dpkg debhelper + + - name: Install packages required for optional configurations of cntlm + run: sudo apt install -y libkrb5-dev + + - name: Build artifact + run: | + ./configure + make + make rpm + make deb + + - name: Extract and format version + id: format_version + run: | + version=$(echo "${{ github.ref }}" | sed 's/refs\/tags\///') + echo "VERSION=$version" >> $GITHUB_OUTPUT + + shell: bash + + - name: Create or Update Release + id: create_or_update_release + uses: softprops/action-gh-release@v0.1.15 + with: + files: | + cntlm*.rpm + cntlm*.deb + tag_name: ${{ steps.format_version.outputs.VERSION }} + name: Release ${{ steps.format_version.outputs.VERSION }} + diff --git a/.github/workflows/windows_release.yml b/.github/workflows/windows_release.yml new file mode 100644 index 0000000..e51c1c0 --- /dev/null +++ b/.github/workflows/windows_release.yml @@ -0,0 +1,49 @@ +name: Windows Release + +on: + push: + tags: + - '*' + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + env: + CC: gcc + steps: + + - uses: cygwin/cygwin-install-action@master + with: + platform: x86_64 + packages: gcc-core make ghostscript dos2unix zip cygrunsrv + + - run: git config --global core.autocrlf input + + - uses: actions/checkout@v4 + + - name: Build artifacts + run: >- + cd ${GITHUB_WORKSPACE} && + export CC=gcc && + ./configure && + make && + make win + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + + - name: Extract and format version + id: format_version + run: | + version=$(echo "${{ github.ref }}" | sed 's/refs\/tags\///') + echo "VERSION=$version" >> $GITHUB_OUTPUT + shell: bash + + - name: Create or Update Release + id: create_or_update_release + uses: softprops/action-gh-release@v0.1.15 + with: + files: | + cntlm-*-win64.exe + cntlm-*-win64.zip + tag_name: ${{ steps.format_version.outputs.VERSION }} + name: Release ${{ steps.format_version.outputs.VERSION }} \ No newline at end of file