Skip to content

Commit

Permalink
create release procedure
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Aguilera <[email protected]>
  • Loading branch information
jagedn committed Jul 2, 2024
1 parent 5fb5039 commit ec7ba54
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 15 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

permissions:
contents: write

jobs:
build:
if: github.ref == 'refs/heads/master'
name: Build
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
java_version: [19]

steps:
- name: Environment
run: env | sort

- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
submodules: true

- name: Setup Java ${{ matrix.java_version }}
uses: actions/setup-java@v1
with:
java-version: ${{matrix.java_version}}
architecture: x64

- name: Tests
run: ./gradlew check
env:
GRADLE_OPTS: '-Dorg.gradle.daemon=false'

publish-gpr:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 19 for x64
uses: actions/setup-java@v3
with:
java-version: '19'
distribution: 'temurin'
architecture: x64
- name: version
run: echo "::set-output name=version::$(./gradlew properties -q | awk '/^version:/ {print $2}')"
id: version

- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ steps.version.outputs.version }}
tag_name: ${{ github.ref }}
body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: build artifacts
run: ./gradlew jsonPlugin

- name: Upload artifact and release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./plugins/nf-nomad/build/plugin/*
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,16 @@ Follow these steps to package, upload and publish the plugin:
1. Create a file named `gradle.properties` in the project root containing the following attributes (this file should not be committed to Git):

- `github_organization`: the GitHub organisation where the plugin repository is hosted.
- `github_username`: The GitHub username granting access to the plugin repository.
- `github_access_token`: The GitHub access token required to upload and commit changes to the plugin repository.
- `github_commit_email`: The email address associated with your GitHub account.

2. Use the following command to package and create a release for your plugin on GitHub:

```bash
./gradlew :plugins:nf-nomad:upload
```
2. Use the following steps to package and create a release for your plugin on GitHub:

- set the desired `version` value in `gradle.properties` and commit the change in the `master` branch
- tag the repo with the version
- push *all* changes (the tag fill fire the `release` GH action)

Once the action is finished a new release is created and all related artifacts attached to it

3. Create a pull request against [nextflow-io/plugins](https://github.com/nextflow-io/plugins/blob/main/plugins.json) to make the plugin accessible to Nextflow.

Use the `json` file created in previous steps
7 changes: 0 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ import nextflow.gradle.plugins.NextflowPlugin

apply plugin: NextflowPlugin

ext{
github_organization = 'nextflow-io'
github_username = project.findProperty('github_username') ?: 'abhi18av'
github_access_token = project.findProperty('github_access_token') ?: System.getenv('GITHUB_TOKEN')
github_commit_email = project.findProperty('github_commit_email') ?: '[email protected]'
}

nextflowPlugin{
githubOrganization = github_organization
extensionPoints = [
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
version=0.1.0
version=0.1.0
github_organization= 'nextflow-io'

0 comments on commit ec7ba54

Please sign in to comment.