snappymail/.github/workflows/builder.yml

59 lines
1.5 KiB
YAML
Raw Normal View History

2021-01-16 22:51:14 +08:00
name: Builder
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Create Cache
uses: actions/cache@v2
with:
path: '**/node_modules'
key: os-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile --check-files
- run: yarn build
- run: yarn build-pro
2021-01-17 00:26:17 +08:00
- name: Configure GPG Key
run: |
cat <(echo -e "${{ secrets.GPG_SIGNING_KEY }}") | gpg --batch --import --no-tty --yes
for ff in `ls ./build/dist/releases/**/**/*.zip | xargs`; do gpg --detach-sign --no-tty --yes --armor --openpgp -u 87DA4591 --passphrase $GPG_PASSPHRASE $ff; done
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Move all assets to release folder
run: |
mkdir ./release
cp `ls ./build/dist/releases/**/**/*.zip | xargs` ./release
2021-01-16 22:51:14 +08:00
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
2021-01-16 23:58:33 +08:00
draft: true
prerelease: true
2021-01-16 22:51:14 +08:00
2021-01-16 23:58:33 +08:00
- name: Upload Release Assets
uses: shogo82148/actions-upload-release-asset@v1
2021-01-16 22:51:14 +08:00
with:
2021-01-16 23:58:33 +08:00
upload_url: ${{ steps.create_release.outputs.upload_url }}
2021-01-17 00:26:17 +08:00
asset_path: ./release/*