Fix GitHub action workflow to publish snapshots
This commit is contained in:
parent
9ad3b1080f
commit
ad398076a7
21
.github/workflows/maven.yml
vendored
21
.github/workflows/maven.yml
vendored
@ -13,23 +13,28 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: Restore dependency cache
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/.m2/repository
|
||||||
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-maven-
|
||||||
|
|
||||||
- name: Set up JDK 1.8
|
- name: Set up JDK 1.8
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: 1.8
|
java-version: 1.8
|
||||||
|
|
||||||
- name: Install genisoimage
|
- name: Install genisoimage and jq
|
||||||
run: sudo apt-get install genisoimage
|
run: sudo apt-get install genisoimage jq
|
||||||
|
|
||||||
- name: Install jq
|
|
||||||
run: sudo apt-get install jq
|
|
||||||
|
|
||||||
- name: Get the OpenRefine version
|
|
||||||
run: echo ::set-env name=OR_VERSION::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
|
|
||||||
|
|
||||||
- name: Build with Maven
|
- name: Build with Maven
|
||||||
run: ./refine build
|
run: ./refine build
|
||||||
|
|
||||||
|
- name: Get the OpenRefine snapshot version
|
||||||
|
run: echo ::set-env name=OR_VERSION::$(cat ./main/webapp/WEB-INF/classes/git.properties | jq -r '.["git.commit.id.describe"]')
|
||||||
|
|
||||||
- name: Generate dist files
|
- name: Generate dist files
|
||||||
run: ./refine dist ${{ env.OR_VERSION }}
|
run: ./refine dist ${{ env.OR_VERSION }}
|
||||||
|
|
||||||
|
8
.github/workflows/release_manager.sh
vendored
8
.github/workflows/release_manager.sh
vendored
@ -1,14 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
OR_VERSION=${env.OR_VERSION}
|
|
||||||
|
|
||||||
RELEASE_REPO_OWNER=${env.RELEASE_REPO_OWNER}
|
|
||||||
|
|
||||||
RELEASE_REPO_TOKEN=${env.RELEASE_REPO_TOKEN}
|
|
||||||
|
|
||||||
|
|
||||||
# Build Release Message
|
# Build Release Message
|
||||||
API_JSON=$(printf '{"tag_name": "%s","target_commitish": "master","name": "%s","body": "Release of version %s","draft": false,"prerelease": false}' ${OR_VERSION} ${OR_VERSION} ${OR_VERSION} )
|
API_JSON=$(printf '{"tag_name": "%s","target_commitish": "master","name": "OpenRefine snapshot %s","body": "This is a snapshot of the development version of OpenRefine, made on %s.\\n\\nThis contains the latest new features and bug fixes, but might not have been tested as thoroughly as official releases.\\n\\nMake sure you [back up your workspace](https://github.com/OpenRefine/OpenRefine/wiki/Back-Up-OpenRefine-Data) to avoid data loss and report any issues found with this version on [the mailing list](https://groups.google.com/forum/#!forum/openrefine).","draft": false,"prerelease": true}' ${OR_VERSION} ${OR_VERSION} "$(date -u +"%c")" )
|
||||||
|
|
||||||
# Create Release
|
# Create Release
|
||||||
echo $( curl --silent --data "${API_JSON}" "https://api.github.com/repos/${RELEASE_REPO_OWNER}/OpenRefine-nightly-releases/releases?access_token=${RELEASE_REPO_TOKEN}" | jq -r '.upload_url' )
|
echo $( curl --silent --data "${API_JSON}" "https://api.github.com/repos/${RELEASE_REPO_OWNER}/OpenRefine-nightly-releases/releases?access_token=${RELEASE_REPO_TOKEN}" | jq -r '.upload_url' )
|
||||||
|
Loading…
Reference in New Issue
Block a user