2022-02-26 15:29:04 +00:00
|
|
|
name: macos-m1
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
on:
|
2022-04-10 03:30:55 +00:00
|
|
|
# workflow_run:
|
|
|
|
# workflows: [AutoTag]
|
|
|
|
# types: [completed]
|
2022-02-26 15:29:04 +00:00
|
|
|
workflow_dispatch:
|
2022-04-16 03:15:35 +00:00
|
|
|
# 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]
|
2022-04-18 12:23:28 +00:00
|
|
|
qt_ver: [6.3.0]
|
2022-02-26 15:29:04 +00:00
|
|
|
qt_arch: [clang_64]
|
|
|
|
env:
|
|
|
|
targetName: GoldenDict
|
2022-04-18 14:15:07 +00:00
|
|
|
version: 22.4.19-alpha
|
2022-04-10 03:30:55 +00:00
|
|
|
|
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:
|
2022-04-10 03:30:55 +00:00
|
|
|
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: |
|
2022-03-15 11:55:23 +00:00
|
|
|
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')"
|
2022-04-10 03:30:55 +00:00
|
|
|
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
|
2022-04-10 03:30:55 +00:00
|
|
|
- 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 }}
|