Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #34
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
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
tags: | |
- "*.*" | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v2 | |
with: | |
java-version: '8' | |
distribution: 'adopt' | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.ivy2 | |
~/.sbt | |
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }} | |
- name: Set SBT_OPTS | |
run: bash gen_sbt_opts.sh | |
- name: Build | |
run: sbt "scalafmt::test;package;packageDoc;packageSrc" | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: jars | |
path: 'play/target/*/*/*.jar' | |
retention-days: 1 | |
publish: | |
if: ${{ (github.event_name != 'pull_request') && (github.repository == 'lucidsoftware/opentracing-playframework') }} | |
needs: build | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.ivy2 | |
~/.sbt | |
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }} | |
- name: Set SBT_OPTS | |
run: bash gen_sbt_opts.sh | |
- name: Publish to Sonatype | |
run: bash publish.sh | |
env: | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
release: | |
if: ${{ startsWith(github.ref, 'refs/tags') && (github.repository == 'lucidsoftware/opentracing-playframework') }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download artifacts | |
uses: actions/[email protected] | |
with: | |
name: jars | |
- name: Upload assets | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
set -x | |
tag="${GITHUB_REF#refs/tags/}" | |
args=$(printf -- "-a %q " play*/scala*/*.jar) | |
hub release create $args -m "Release $tag" $tag |