diff --git a/.github/workflows/build_elvis_binary.yaml b/.github/workflows/build_elvis_binary.yaml new file mode 100644 index 0000000..c35fd92 --- /dev/null +++ b/.github/workflows/build_elvis_binary.yaml @@ -0,0 +1,34 @@ +name: Build and upload + +on: + push: + tags: + - '*-emqx-*' # Push events matching v*. e.g 1.0.0-emqx-1 + +permissions: + contents: write + +jobs: + build-and-upload: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v7 + - uses: erlef/setup-beam@v1 + with: + otp-version: '28' + rebar3-version: '3.25' + - name: Build release binary + run: | + rebar3 escriptize + cp _build/default/bin/elvis ./elvis + ./elvis --version + - name: Create release and upload binary + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create "$GITHUB_REF_NAME" ./elvis \ + --repo "$GITHUB_REPOSITORY" \ + --verify-tag \ + --title "$GITHUB_REF" \ + --notes "" \ + --prerelease=false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8747fca..98ffab2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,14 +17,14 @@ jobs: otp_vsn: ['26', '27', '28'] rebar3_vsn: ['3.25'] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - uses: erlef/setup-beam@v1 id: setup-beam with: otp-version: ${{matrix.otp_vsn}} rebar3-version: ${{matrix.rebar3_vsn}} - name: Restore _build - uses: actions/cache@v4 + uses: actions/cache@v6 with: path: _build key: "_build-cache-for\ @@ -33,7 +33,7 @@ jobs: -rebar3-${{steps.setup-beam.outputs.rebar3-version}}\ -hash-${{hashFiles('rebar.lock')}}" - name: Restore rebar3's cache - uses: actions/cache@v4 + uses: actions/cache@v6 with: path: ~/.cache/rebar3 key: "rebar3-cache-for\