-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add generate_version.yml pipeline
- Loading branch information
1 parent
92fe5e8
commit d907008
Showing
6 changed files
with
140 additions
and
41 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: IElixir generate documentation | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
required: true | ||
type: string | ||
secrets: | ||
GH_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
docs: | ||
name: Documentation and coverage reports | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
steps: | ||
- name: Checkout IElixir project | ||
uses: actions/checkout@v2 | ||
- name: Set version | ||
run: | | ||
echo ${{ inputs.version }} > VERSION | ||
- name: Install prerequisites | ||
run: | | ||
sudo apt install -y openssl libncurses5 | ||
sudo apt install -y libzmq3-dev libsqlite3-dev libssl-dev | ||
- name: Set up Elixir | ||
uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: 'OTP-26.0' | ||
elixir-version: 'v1.14-otp-26' | ||
- name: Generate documentation | ||
run: | | ||
MIX_ENV=docs mix deps.get | ||
MIX_ENV=docs mix compile | ||
MIX_ENV=docs mix docs | ||
MIX_ENV=docs mix inch.report | ||
MIX_ENV=test mix coveralls.github |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Reusable version generation workflow | ||
|
||
on: | ||
workflow_call: | ||
outputs: | ||
version: | ||
description: "Generated version" | ||
value: ${{ jobs.generate_version.outputs.version }} | ||
build_version: | ||
description: "Generated build version" | ||
value: ${{ jobs.generate_version.outputs.build_version }} | ||
is_release: | ||
description: "Generated is release flag" | ||
value: ${{ jobs.generate_version.outputs.is_release }} | ||
|
||
jobs: | ||
generate_version: | ||
name: Generate version job | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.gen_ielixir_version.outputs.IELIXIR_VERSION }} | ||
build_version: ${{ steps.gen_ielixir_version.outputs.IELIXIR_BUILD_VERSION }} | ||
is_release: ${{ steps.gen_ielixir_version.outputs.IELIXIR_IS_RELEASE }} | ||
steps: | ||
- name: Checkout IElixir project | ||
uses: actions/checkout@v2 | ||
- name: Generate version | ||
id: gen_ielixir_version | ||
run: | | ||
echo "IELIXIR_VERSION=$(cat ./VERSION)" >> $GITHUB_OUTPUT | ||
echo "IELIXIR_BUILD_VERSION=$(cat ./VERSION)+dev$(date '+%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT | ||
- name: Check if release | ||
id: check_if_release | ||
run: | | ||
echo "${{ github.ref }}" | ||
echo "IELIXIR_IS_RELEASE=${{ startsWith(github.ref, 'refs/tags/') }}" >> $GITHUB_OUTPUT | ||
- name: Print flags | ||
run: | | ||
cat $GITHUB_OUTPUT | ||
echo $GITHUB_OUTPUT | ||
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.0.0 | ||
1.0.1 |