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

Issue 6011 - Backport 'Release' GitHub Action to 1.4.3 #6012

Merged
merged 1 commit into from
Dec 19, 2023
Merged
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
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release

on:
push:
tags:
- "389-ds-base-*"
workflow_dispatch:
inputs:
version:
description: Specify tag to generate a tarball
required: true
skip-audit-ci:
description: Skip npm audit-ci
type: boolean
default: false

permissions:
actions: read
packages: read
contents: write

jobs:
build:
runs-on: ubuntu-latest
container:
image: quay.io/389ds/ci-images:test
steps:
- name: Get the version
id: get_version
run: |
echo "version=${VERSION}" >> $GITHUB_OUTPUT
env:
VERSION: ${{ github.event.inputs.version || github.ref_name }}

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ steps.get_version.outputs.version }}

- name: Create tarball
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
if [ "${{ github.event.inputs.skip-audit-ci }}" = "true" ]; then
export SKIP_AUDIT_CI=1
fi
TAG=${{ steps.get_version.outputs.version }} make -f rpm.mk dist-bz2

- name: Upload tarball
uses: actions/upload-artifact@v3
with:
name: ${{ steps.get_version.outputs.version }}.tar.bz2
path: ${{ steps.get_version.outputs.version }}.tar.bz2

- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.get_version.outputs.version }}
files: |
${{ steps.get_version.outputs.version }}.tar.bz2
Loading