diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ac3de76..c29adba 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: fail-fast: false matrix: rebar3_version: - - "3.25.1" + - "3.27.0" arch: - "x64" - "arm64" @@ -42,6 +42,20 @@ jobs: cat $GITHUB_OUTPUT + - name: Classify release + id: release + run: | + case "${{ steps.version.outputs.otp_version }}" in + *-alpha*|*-beta*|*-rc*) + echo "gh_release_flags=--prerelease" >> $GITHUB_OUTPUT + ;; + *) + echo "gh_release_flags=" >> $GITHUB_OUTPUT + ;; + esac + + cat $GITHUB_OUTPUT + - name: Build run: | chmod +x ./build.sh @@ -57,12 +71,14 @@ jobs: - name: Create GitHub Release env: GH_TOKEN: ${{ github.token }} + GH_RELEASE_FLAGS: ${{ steps.release.outputs.gh_release_flags }} run: | apk add --no-cache github-cli gh release create OTP-${{ steps.version.outputs.otp_version }} \ /tmp/erlang-${{ steps.version.outputs.otp_version }}-${{ matrix.arch }}.tar.gz \ --title "OTP ${{ steps.version.outputs.otp_version }}" \ --notes "Erlang/OTP ${{ steps.version.outputs.otp_version }} built for Linux" \ + ${GH_RELEASE_FLAGS} \ --repo ${{ github.repository }} || \ gh release upload OTP-${{ steps.version.outputs.otp_version }} \ /tmp/erlang-${{ steps.version.outputs.otp_version }}-${{ matrix.arch }}.tar.gz \ @@ -78,7 +94,7 @@ jobs: fail-fast: false matrix: rebar3_version: - - "3.25.1" + - "3.27.0" arch: - "x64" - "arm64" @@ -98,6 +114,20 @@ jobs: cat $GITHUB_OUTPUT + - name: Classify release + id: release + run: | + case "${{ steps.version.outputs.otp_version }}" in + *-alpha*|*-beta*|*-rc*) + echo "gh_release_flags=--prerelease" >> $GITHUB_OUTPUT + ;; + *) + echo "gh_release_flags=" >> $GITHUB_OUTPUT + ;; + esac + + cat $GITHUB_OUTPUT + - name: Build run: | chmod +x ./build-musl.sh @@ -113,12 +143,14 @@ jobs: - name: Create GitHub Release env: GH_TOKEN: ${{ github.token }} + GH_RELEASE_FLAGS: ${{ steps.release.outputs.gh_release_flags }} run: | apk add --no-cache github-cli gh release create OTP-${{ steps.version.outputs.otp_version }} \ /tmp/erlang-${{ steps.version.outputs.otp_version }}-${{ matrix.arch }}-musl.tar.gz \ --title "OTP ${{ steps.version.outputs.otp_version }}" \ --notes "Erlang/OTP ${{ steps.version.outputs.otp_version }} built for Linux" \ + ${GH_RELEASE_FLAGS} \ --repo ${{ github.repository }} || \ gh release upload OTP-${{ steps.version.outputs.otp_version }} \ /tmp/erlang-${{ steps.version.outputs.otp_version }}-${{ matrix.arch }}-musl.tar.gz \ @@ -134,7 +166,7 @@ jobs: fail-fast: false matrix: rebar3_version: - - "3.25.1" + - "3.27.0" arch: - "x64" - "arm64" @@ -155,6 +187,20 @@ jobs: cat $GITHUB_OUTPUT + - name: Classify release + id: release + run: | + case "${{ steps.version.outputs.otp_version }}" in + *-alpha*|*-beta*|*-rc*) + echo "gh_release_flags=--prerelease" >> $GITHUB_OUTPUT + ;; + *) + echo "gh_release_flags=" >> $GITHUB_OUTPUT + ;; + esac + + cat $GITHUB_OUTPUT + - name: Build run: | chmod +x ./build-glibc.sh @@ -170,12 +216,14 @@ jobs: - name: Create GitHub Release env: GH_TOKEN: ${{ github.token }} + GH_RELEASE_FLAGS: ${{ steps.release.outputs.gh_release_flags }} run: | apt install -y --no-install-recommends gh gh release create OTP-${{ steps.version.outputs.otp_version }} \ /tmp/erlang-${{ steps.version.outputs.otp_version }}-${{ matrix.arch }}-glibc.tar.gz \ --title "OTP ${{ steps.version.outputs.otp_version }}" \ --notes "Erlang/OTP ${{ steps.version.outputs.otp_version }} built for Linux" \ + ${GH_RELEASE_FLAGS} \ --repo ${{ github.repository }} || \ gh release upload OTP-${{ steps.version.outputs.otp_version }} \ /tmp/erlang-${{ steps.version.outputs.otp_version }}-${{ matrix.arch }}-glibc.tar.gz \ diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index c416a43..8287816 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -13,13 +13,13 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - - name: Check for now OTP releases + - name: Check for new OTP releases shell: bash env: GH_TOKEN: ${{ github.token }} run: | git fetch --tags - releases=$(gh release list --exclude-drafts --exclude-pre-releases -R erlang/otp --limit 3 | cut -f 3) + releases=$(gh release list --exclude-drafts -R erlang/otp --limit 3 | cut -f 3) for release in $releases do diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index 31aaea7..79dd7c9 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -16,7 +16,7 @@ jobs: GH_TOKEN: ${{ github.token }} run: | git fetch --tags - releases=$(gh release list --exclude-drafts --exclude-pre-releases --limit 50 | cut -f 3) + releases=$(gh release list --exclude-drafts --limit 50 | cut -f 3) for release in $releases do diff --git a/Dockerfile b/Dockerfile index f14e3e7..35057e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM docker.io/library/alpine:3.22 -ENV OTP_VERSION="28.3.2" \ - REBAR3_VERSION="3.25.0" +ENV OTP_VERSION="29.0-rc3" \ + REBAR3_VERSION="3.27.0" LABEL org.opencontainers.image.version=$OTP_VERSION