goldendict-ng/.github/workflows/macos-m1.yml

76 lines
2.2 KiB
YAML
Raw Normal View History

2022-02-26 15:29:04 +00:00
name: macos-m1
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
# workflow_run:
# workflows: [AutoTag]
# types: [completed]
2022-02-26 15:29:04 +00:00
workflow_dispatch:
push:
branches:
- dev
- master
# - staged
paths-ignore:
- 'docs/**'
- ".github/**"
- "howto/**"
- "*.md"
- ".clang-format"
pull_request:
branches:
- dev
- master
# - staged
paths-ignore:
- 'docs/**'
- ".github/**"
- "howto/**"
- "*.md"
2022-02-26 15:29:04 +00:00
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
2022-03-20 11:38:08 +00:00
os: [macos-11]
qt_ver: [6.2.4]
2022-02-26 15:29:04 +00:00
qt_arch: [clang_64]
env:
targetName: GoldenDict
version: 22.4.7-alpha
2022-02-26 15:29:04 +00:00
steps:
2022-03-20 11:38:08 +00:00
- uses: actions/checkout@v3
2022-02-26 15:29:04 +00:00
with:
fetch-depth: 0
# - name: get current time
# run: echo "REL_DATE=$(date +'%Y%m%d-%H%M%S')" >> $GITHUB_ENV
# - name: get OS version
# run: echo "OS_VER=$(sw_vers -productVersion)" >> $GITHUB_ENV
2022-02-26 15:29:04 +00:00
- name: Set outputs
id: vars
run: |
echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)"
2022-02-26 15:29:04 +00:00
echo "::set-output name=release_date::$(date +'%Y%m%d')"
echo "::set-output name=release_time::$(date +'%H%M%S')"
echo "::set-output name=release_time_clock::$(date +'%H:%M:%S')"
echo "::set-output name=release_hm::$(date +'%y%m%d%H%M')"
previousTag=$(git tag --sort=-creatordate | sed -n 2p)
echo "previousTag : $previousTag"
CHANGELOG="$(git log --oneline --no-decorate $previousTag..HEAD)"
CHANGELOG="${CHANGELOG//'%'/'%25'}"
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
echo "::set-output name=COMMIT_SUMMARY::$(echo "$CHANGELOG")"
2022-02-26 15:29:04 +00:00
# tag 上传Release
- name: publish
uses: softprops/action-gh-release@v1
with:
name: ${{ env.targetName }}-AppleSilicon-${{ matrix.qt_ver }}_${{ matrix.os }}_${{ steps.vars.outputs.sha_short }}
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}