diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 71f16dd..b7d0287 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,10 +4,31 @@ on: [push] jobs: build: - runs-on: ubuntu-latest - + steps: - - uses: actions/checkout@v1 - - name: Build files - run: ./build.sh + - uses: actions/checkout@v2 + - name: Build files + run: | + ./build.sh + zip --junk-paths release public_html/* + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release build + id: upload-release-build + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./release.zip + asset_name: release.zip + asset_content_type: application/zip