Skip to content

Commit

Permalink
cut release
Browse files Browse the repository at this point in the history
  • Loading branch information
lrfurtado committed Sep 25, 2022
1 parent 86edd38 commit 79167b2
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/cut-release-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "cut-release-tag"

on:
workflow_dispatch:
inputs:
version:
description: 'Version (leave blank for auto-increment)'
required: false
jobs:
cut_release_tag:
runs-on: ubuntu-22.04
steps:
- name: Install deps
run: |
sudo apt-get install python3-semver -y
- name: Checkout code
uses: actions/checkout@v3
- name: Update VERSION file on checkout
run: |
set -xeu -o pipefail
CURRENT_VERSION=$(cat VERSION)
echo "Current Version: $CURRENT_VERSION"
if [ -z "$NEW_VERSION" ]; then
NEW_VERSION=$(pysemver bump patch "$CURRENT_VERSION")
fi
echo $NEW_VERSION > VERSION
echo "::set-output name=NEW_VERSION::$NEW_VERSION"
id: bump-version-file
env:
NEW_VERSION: ${{ inputs.version }}
- name: Commit VERSION file
uses: EndBug/add-and-commit@v9
id: commit-version
with:
add: 'VERSION'
message: "Release numactl ${{ steps.bump-version-file.outputs.NEW_VERSION }}"
committer_name: GitHub Actions
committer_email: actions@github.com
- uses: rickstaa/action-create-tag@v1
with:
tag: "v${{ steps.bump-version-file.outputs.NEW_VERSION }}"
message: "Release numactl ${{ steps.bump-version-file.outputs.NEW_VERSION }}"
commit_sha: "${{ steps.commit-version.outputs.commit_sha }}"
39 changes: 39 additions & 0 deletions .github/workflows/cut-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "cut-release"
on:
workflow_run:
workflows: [cut-release-tag]
types:
- completed
push:
tags:
- v*
jobs:
cut_release:
runs-on: ubuntu-22.04
steps:
- name: Install deps
run: |
sudo apt-get install build-essential python3-semver fakeroot -y
- name: Checkout code
uses: actions/checkout@v3
- name: "Build & test"
run: |
./autogen.sh
./configure
fakeroot make distcheck
- name: Read release version
id: read-version-file
run: |
set -xeu -o pipefail
CURRENT_VERSION=$(cat VERSION)
echo "::set-output name=VERSION::$CURRENT_VERSION"
- name: Create Release
id: create_release
uses: marvinpinto/action-automatic-releases@v1.2.1
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "v${{ steps.read-version-file.outputs.VERSION }}"
draft: true
prerelease: false
files: |
numactl-*.tar.gz

0 comments on commit 79167b2

Please sign in to comment.