Skip to content

nightly-release

nightly-release #699

name: "nightly-release"
env:
MTN_GPG_SIGN: "1"
# See: https://github.com/marketplace/actions/sccache-action
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
on:
workflow_dispatch:
schedule:
- cron: "0 12 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
# Clone repository
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.63
override: true
default: true
# Use rust-cache to cache dependencies, which is a large chunk of the build.
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
# Don't cache ./target, as it takes tons of space, rely on sccache instead.
cache-targets: false
# We set a shared key, as our cache is reusable between jobs
shared-key: rust-cargo
workspaces: lib/rust
# Use sccache to cache everything else.
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.3
- uses: actions/setup-java@v3
with:
distribution: corretto
java-version: 11
- uses: gradle/gradle-build-action@v2
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- run: |
python -m pip install cargo-lambda
# Build your application, tool, artifacts, etc.
- name: Build
shell: bash
run: |
make -j package
- uses: actions/upload-artifact@v3
with:
name: build-assets
path: "matano*.sh*"
release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v3
with:
name: build-assets
- name: "Update nightly release"
if: success()
uses: pyTooling/Actions/releaser@r0
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: nightly
files: "matano*.sh*"