name: Create Archive
on:
  push:
    tags:
      - 'v*'
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Archive Release
      uses: thedoctor0/zip-release@master
      with:
        type: 'zip'
        filename: 'magisk-module-miui-cn2global.zip'
        exclusions: '*.git* /*node_modules/* .editorconfig'
    - name: Upload Release
      uses: ncipollo/release-action@v1
      with:
        artifacts: "magisk-module-miui-cn2global.zip"
        token: ${{ secrets.GITHUB_TOKEN }}
