Skip to content

bump scalameta

bump scalameta #90

Workflow file for this run

on: push
jobs:
build-and-upload:
name: build and upload
strategy:
matrix:
os: [macos, ubuntu]
include:
- os: ubuntu
runs: ubuntu-latest
artifact-name: sup-linux-amd
- os: macos
runs: macos-latest
artifact-name: sup-macos-amd
runs-on: ${{ matrix.runs }}
steps:
- name: checkout
uses: actions/checkout@v2
- uses: coursier/cache-action@v6
- name: test for ${{ matrix.os }}
run: |
./sbt test
- uses: olafurpg/setup-scala@v13
- run: sbt ci-release
if: ${{ matrix.os == 'macos' }}
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
- uses: graalvm/setup-graalvm@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
version: 'latest'
java-version: '17'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: build for ${{ matrix.os }}
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
./sbt graalvm-native-image:packageBin
# disable on window: https://github.com/upx/upx/issues/559
- name: run upx on ${{ matrix.os }}
uses: svenstaro/upx-action@v2
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
file: target/graalvm-native-image/scala-update
args: --best --lzma
- name: upload ${{ matrix.os }}
uses: actions/upload-artifact@v2
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
name: ${{ matrix.artifact-name }}
path: target/graalvm-native-image/scala-update
- name: release binaries
uses: svenstaro/upload-release-action@v2
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/graalvm-native-image/scala-update
asset_name: ${{ matrix.artifact-name }}
overwrite: true
tag: ${{ github.ref }}
- id: get_version
if: ${{ matrix.os == 'macos' && startsWith(github.ref, 'refs/tags/') }}
uses: battila7/get-version-action@v2
- name: bump homebrew formula
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}
if: ${{ matrix.os == 'macos' && startsWith(github.ref, 'refs/tags/') }}
run: |
brew tap kitlangton/tap
brew bump-formula-pr kitlangton/tap/scala-update -f --no-browse --no-audit \
--url="https://github.com/kitlangton/scala-update/releases/download/${{ steps.get_version.outputs.version }}/${{ matrix.artifact-name }}"