Skip to content

Commit

Permalink
Merge branch 'ci-gh-release-src-archive' into 'master'
Browse files Browse the repository at this point in the history
ci: archive release source

See merge request mkjeldsen/commitmsgfmt!75
  • Loading branch information
commonquail committed Nov 11, 2023
2 parents 6397ffd + f729c3a commit 7e0a176
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,41 @@ permissions:

jobs:

archive-src:
name: archive-src
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --yes --no-install-recommends \
lzip
- name: Archive source code
shell: bash
run: |
v="${GITHUB_REF#refs/tags/}"
release_name="commitmsgfmt-$v"
asset_name="${release_name}.tar.lz"
git archive --prefix="${release_name}/" --format=tar "$v" |
lzip -6 >"$asset_name"
printf 'ASSET=%s\n' "$asset_name" >> $GITHUB_ENV
printf 'RELEASE_VERSION=%s\n' "$v" >> $GITHUB_ENV
- name: Upload source code archive
uses: softprops/action-gh-release@v1
with:
draft: true
tag_name: ${{ env.RELEASE_VERSION }}
files: ${{ env.ASSET }}

build-package:
name: build-package
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit 7e0a176

Please sign in to comment.