-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.1 KB
/
Copy pathrelease.yml
File metadata and controls
50 lines (41 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Build and Release codeqa
on:
workflow_dispatch:
inputs:
version:
description: "Release version tag (e.g. v0.1.0)"
required: true
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
env:
MIX_ENV: dev
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Elixir with shared cache
uses: ./.github/actions/setup-elixir
with:
mix-env: dev
- name: Build escript
run: mix escript.build
- name: Determine version
id: version
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "tag=${{ github.event.inputs.version }}" >> "$GITHUB_OUTPUT"
else
echo "tag=${{ github.ref_name }}" >> "$GITHUB_OUTPUT"
fi
- name: Create release
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ steps.version.outputs.tag }}
name: ${{ steps.version.outputs.tag }}
files: codeqa
generate_release_notes: true