-
Notifications
You must be signed in to change notification settings - Fork 21
34 lines (29 loc) · 1.08 KB
/
parsemsg.yml
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
name: Test wheel file build
on: [push, pull_request]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }} for Python ${{ matrix.pyver }}
# if: github.event_name == 'pull_request'
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
fail-fast: false
matrix:
os: [macos-14]
pyver: [cp311]
steps:
- name: Set tags env variables.
run: |
# Set "checking" variable to false by default.
echo "has_tags=false" >> $GITHUB_ENV
# Get your last commit message, not the merge commit.
text=$(git log -1 --no-merges --pretty=%B)
# Read the commit message into an array split by "#".
readarray -d "#" -t commit_message <<< "$text"
# Sanity check.
echo "the tags are: ${commit_message[1]}"
# Add tags and overwrite "checking" variable to true if there are tags.
if [[ "${commit_message[1]}" == *"@"* ]]; then
echo "has_tags=true" >> $GITHUB_ENV
echo "spec_tags=${commit_message[1]}" >> $GITHUB_ENV
fi