Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Release Action #108

Merged
merged 6 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/ubuntu_release.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
files: |
cntlm*.rpm
cntlm*.deb
tag_name: ${{ steps.format_version.outputs.VERSION }}
name: Release ${{ steps.format_version.outputs.VERSION }}

49 changes: 49 additions & 0 deletions .github/workflows/windows_release.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
files: |
cntlm-*-win64.exe
cntlm-*-win64.zip
tag_name: ${{ steps.format_version.outputs.VERSION }}
name: Release ${{ steps.format_version.outputs.VERSION }}
Loading