Reapply "no need for otp-based rebar.config" #828
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: | |
push: | |
branches: | |
- github* | |
- master | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- '**' | |
schedule: | |
- cron: 0 0 * * * | |
jobs: | |
ci: | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
otp_vsn: | |
- 'slim' | |
- '27-slim' | |
- '26.2-slim' | |
- '26.1-slim' | |
- '26-slim' | |
- '25.3-slim' | |
- '25.2-slim' | |
- '25.1-slim' | |
- '25-slim' | |
- '24.3-slim' | |
- '24.2-slim' | |
- '24.1-slim' | |
- '24.0-slim' | |
- '23.3-slim' | |
- '23.2-slim' | |
- '23.1-slim' | |
- '23-slim' | |
- '22.3-slim' | |
- '22.2-slim' | |
# - '22.1-slim' | |
- '22-slim' | |
- '21.3-slim' | |
# - '20.3-slim' | |
# - '19.3-slim' | |
name: 'ci-erl:${{ matrix.otp_vsn }}' | |
runs-on: ubuntu-latest | |
container: | |
image: 'erlang:${{ matrix.otp_vsn }}' | |
steps: | |
- shell: bash | |
run: | | |
# NOTE sync with ./Dockerfile.build.sh | |
apt-get -y update | |
apt-get -y install curl git make | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
# https://github.com/actions/runner/issues/2033 | |
# https://github.com/actions/checkout/issues/766 | |
- shell: bash | |
run: | | |
chown -R "$(id -u):$(id -g)" "${GITHUB_WORKSPACE}" | |
git config --global --add safe.directory "${GITHUB_WORKSPACE}" | |
- shell: bash | |
run: make | |
- shell: bash | |
run: make test | |
- if: ${{ matrix.otp_vsn == 'slim' }} | |
shell: bash | |
run: make check docs | |
# PUBLISH TAGS | |
- if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
name: Check is-semver-tag | |
id: is-semver-tag | |
shell: bash | |
run: | | |
if [[ ${{ github.event.ref }} =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+ ]]; then | |
echo ::set-output name=check::true | |
fi | |
- if: ${{ matrix.otp_vsn == 'slim' && steps.is-semver-tag.outputs.check == 'true'}} | |
name: Run make publish | |
shell: bash | |
env: | |
HEX_API_KEY: ${{secrets.HEX_API_KEY}} | |
run: | | |
mkdir -p ~/.config/rebar3 | |
echo "{plugins, [rebar3_hex]}." > ~/.config/rebar3/rebar.config | |
make publish |