name: Publish
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
container: debian:11
steps:
- name: Install
run: |
apt-get update -y && apt-get upgrade -y
apt-get install -y gcc curl git
curl https://sh.rustup.rs -sSf | sh -s -- -y
- name: Get files
uses: actions/checkout@v4
- name: Build
run: /github/home/.cargo/bin/cargo build --verbose
- name: Run tests
run: /github/home/.cargo/bin/cargo test --verbose
- name: GalM Command tests
run: |
/github/home/.cargo/bin/cargo build --example galm --release
bash -e ./.github/scripts/galm_spec.sh
- name: Publish
env:
CARGO: /github/home/.cargo/bin/cargo
GITHUB_REF: ${{ secrets.GITHUB_REF }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: GitHub Actions
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }}
EMAIL_FOR_AUTO_COMMIT: ${{ secrets.EMAIL_FOR_AUTO_COMMIT }}
CRATES_IO_API_ACCESS_KEY: ${{ secrets.CRATES_IO_API_ACCESS_KEY }}
run: |
export GITHUB_REF=`echo ${GITHUB_REF#refs/heads/}`
bash -e ./.github/scripts/publish.sh