Skip to content

Commit

Permalink
add to develop to allow interaction [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-yuen committed May 30, 2023
1 parent c3b53c9 commit 6671c22
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/collab-mvn-settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<settings>
<servers>
<server>
<id>central</id>
<username>dockstore-bot</username>
<password>${env.COLLAB_DEPLOY_TOKEN}</password>
</server>
</servers>
</settings>
58 changes: 58 additions & 0 deletions .github/workflows/deploy_tagged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Tagged release deploy

on:
workflow_dispatch:
inputs:
changelist:
description: 'patch and pre-release metadata'
required: true
default: '.0-alpha.1'


jobs:
build:
runs-on: ubuntu-22.04

# Should only release tags
# TODO: should only release tags where the required status checks are passing
if: startsWith(github.ref, 'refs/tags/')

permissions:
id-token: write

steps:
- uses: actions/checkout@v3
# Step that does that actual cache save and restore
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: install git secrets
run: |
wget --no-verbose -O git-secrets-1.3.0.tar.gz https://github.com/awslabs/git-secrets/archive/1.3.0.tar.gz
tar -zxf git-secrets-1.3.0.tar.gz
cd git-secrets-1.3.0
sudo make install
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17.0.4+8'
distribution: 'adopt'

- name: Store Maven project version
run: echo "maven_project_version=$(mvn help:evaluate -Dexpression=project.version -Dchangelist=${{ github.event.inputs.changelist }} -q -DforceStdout)" >> $GITHUB_ENV

- name: Read exported variable
run: |
echo "${{ env.maven_project_version }}"
- name: Deploy with mvnw
run: |
git config --global user.email "${{ github.actor }}"
git config --global user.name "${{ github.actor }}"
./mvnw --batch-mode deploy -ntp -s .github/collab-mvn-settings.xml -DskipTests -Dchangelist=${{ github.event.inputs.changelist }}
env:
COLLAB_DEPLOY_TOKEN: ${{ secrets.COLLAB_DEPLOY_TOKEN }}

0 comments on commit 6671c22

Please sign in to comment.