-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WORKFLOWS: Add some github workflows
- Loading branch information
Showing
4 changed files
with
169 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: Make distribution archives | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
config-flags: | ||
description: 'Configure flags to prepare the source directory' | ||
default: '' | ||
required: false | ||
type: string | ||
zip: | ||
description: 'Additionally create ZIP archive next to default GZIP' | ||
required: false | ||
default: false | ||
type: boolean | ||
artifact-name: | ||
description: 'Name of the artifact' | ||
required: false | ||
default: 'distribution-archives' | ||
type: string | ||
workflow_call: | ||
inputs: | ||
config-flags: | ||
description: 'Configure flags to prepare the source directory' | ||
default: '' | ||
required: false | ||
type: string | ||
zip: | ||
description: 'Additionally create ZIP archive next to default GZIP' | ||
required: false | ||
default: false | ||
type: boolean | ||
artifact-name: | ||
description: 'Name of the artifact' | ||
required: false | ||
default: 'distribution-archives' | ||
type: string | ||
outputs: | ||
version_number: | ||
description: "The Version number of this build" | ||
value: ${{ jobs.make_dist.outputs.version_number }} | ||
|
||
jobs: | ||
make_dist: | ||
runs-on: ubuntu-latest | ||
# Map the job outputs to step outputs | ||
outputs: | ||
version_number: ${{ steps.tarball.outputs.version_number }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install prerequisites | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install \ | ||
build-essential \ | ||
autoconf \ | ||
automake \ | ||
gengetopt \ | ||
libtool | ||
- name: Autotools setup | ||
run: | | ||
autoreconf -i | ||
- name: Configure | ||
run: ./configure ${{ inputs.config-flags }} | ||
- name: Make tarball | ||
id: tarball | ||
run: | | ||
make dist-gzip | ||
version_number=$(ls RNAcode-*.tar.gz) | ||
version_number="${version_number#RNAcode-}" | ||
version_number="${version_number%.tar.gz}" | ||
echo "version_number=${version_number}" >> "$GITHUB_OUTPUT" | ||
- name: Make ZIP | ||
if: ${{ inputs.zip }} | ||
run: make dist-zip | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.artifact-name }} | ||
path: | | ||
RNAcode-*.tar.gz | ||
RNAcode-*.zip | ||
retention-days: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Run distcheck | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
config-flags: | ||
description: 'Configure flags to prepare the source directory' | ||
default: '' | ||
required: false | ||
type: string | ||
workflow_call: | ||
inputs: | ||
config-flags: | ||
description: 'Configure flags to prepare the source directory' | ||
default: '' | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install prerequisites | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install \ | ||
build-essential \ | ||
autoconf \ | ||
automake \ | ||
gengetopt \ | ||
libtool | ||
- name: Autotools setup | ||
run: | | ||
autoreconf -i | ||
- name: Configure | ||
run: ./configure ${{ inputs.config-flags }} | ||
- name: distcheck | ||
run: make distcheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: Process Pull Request | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
run-distcheck: | ||
uses: ./.github/workflows/dist_check.yaml | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Version release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*' | ||
|
||
jobs: | ||
run-distcheck: | ||
uses: ./.github/workflows/dist_check.yaml | ||
|
||
create-dist-archives: | ||
needs: run-distcheck | ||
uses: ./.github/workflows/dist_archives.yaml | ||
with: | ||
zip: true | ||
artifact-name: 'dist-archives' | ||
|
||
create-release: | ||
needs: [run-distcheck, create-dist-archives] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download source archives | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: dist-archives | ||
- name: Make release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "RNAcode-*.tar.gz,RNAcode-*.zip" | ||
name: "RNAcode ${{ needs.create-dist-archive.outputs.version_number }}" |