name: macos-m1 concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true on: # workflow_run: # workflows: [AutoTag] # types: [completed] 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" jobs: build: name: Build runs-on: ${{ matrix.os }} strategy: matrix: os: [macos-11] qt_ver: [6.2.4] qt_arch: [clang_64] env: targetName: GoldenDict version: 22.4.7-alpha steps: - uses: actions/checkout@v3 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 - name: Set outputs id: vars run: | echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)" 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")" # 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 }}