update release script. add mac packager #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy gh-pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Install | |
run: npm install | |
- name: Build | |
run: npm run pack-osx | |
- name: Setup Git | |
id: setup | |
run: | | |
git config --local user.name "${{ secrets.USER_NAME }}" | |
git config --local user.email "${{ secrets.USER_EMAIL }}" | |
TAG_NAME=${{ github.ref_name }}-$(git log --format=%h -1) | |
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_OUTPUT | |
git tag $TAG_NAME | |
git push origin $TAG_NAME | |
- name: Pack | |
run: | | |
mv release/the-happy-app-darwin-x64 ./the-happy-app-mac | |
tar -czf the-happy-app-mac.tar.gz the-happy-app-mac | |
mv release/the-happy-app-mac-installer/the-happy-app.dmg . | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
the-happy-app-mac.tar.gz | |
the-happy-app.dmg | |
tag_name: ${{ steps.setup.outputs.TAG_NAME }} |