Release #43
Workflow file for this run
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: Release | |
on: | |
push: | |
tags: | |
- v2.* | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: CHECKOUT | |
uses: actions/checkout@v3 | |
with: | |
path: ra | |
- name: CONFIGURE OTP & ELIXIR | |
uses: erlef/setup-beam@v1.16 | |
with: | |
otp-version: 26 | |
- name: ASSERT VERSIONS | |
id: versions | |
working-directory: ra | |
run: | | |
sudo npm install --global --silent @bazel/buildozer | |
VERSION_APP_SRC="$(erl -eval '{ok, [{application, _, AppInfo}]} = file:consult("src/ra.app.src"), Version = proplists:get_value(vsn, AppInfo), io:fwrite(Version), halt().' -noshell)" | |
if [[ "${{ github.ref_name }}" != "v$VERSION_APP_SRC" ]]; then | |
echo "Version in src/ra.app.src ($VERSION_APP_SRC) does not match tag (${{ github.ref_name }})" | |
exit 1 | |
fi | |
VERSION_BAZEL="$(cat MODULE.bazel | buildozer 'print version' -:%module)" | |
if [[ "${{ github.ref_name }}" != "v$VERSION_BAZEL" ]]; then | |
echo "Version in MODULE.bazel ($VERSION_BAZEL) does not match tag (${{ github.ref_name }})" | |
exit 1 | |
fi | |
echo "version=$VERSION_BAZEL" | tee -a $GITHUB_OUTPUT | |
- name: FETCH THE SOURCE ARCHIVE | |
run: | | |
curl \ | |
-L \ | |
-o ra-${{ steps.versions.outputs.version }}.tar.gz \ | |
https://github.com/${{ github.repository }}/archive/${{ github.ref }}.tar.gz | |
- name: CREATE RELEASE | |
id: create-release | |
uses: ncipollo/release-action@v1.13.0 | |
with: | |
allowUpdates: true | |
artifactErrorsFailBuild: true | |
updateOnlyUnreleased: true | |
generateReleaseNotes: true | |
artifacts: >- | |
ra-${{ steps.versions.outputs.version }}.tar.gz |