summaryrefslogtreecommitdiffstats
path: root/.github/workflows/main.yml
blob: 01e5bc94ac931df249f8cce639e4e713a9c2aefc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Package plugin
on:
  push:
    branches: [ master ]

jobs:
  package:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Package
        run: python3 make_release.py

      - name: Upload
        uses: actions/upload-artifact@v2
        with: 
          name: plugin
          path: |
            DeDRM_tools_*.zip
            DeDRM_tools.zip

      - name: Delete old release
        uses: cb80/delrel@latest
        with:
          tag: autorelease
          token: ${{ github.token }}

      - name: Delete old tag
        uses: dev-drprasad/[email protected]
        with:
          tag_name: autorelease
          github_token: ${{ github.token }}
          delete_release: true
      
      - name: Prepare release
        run: cp DeDRM_tools.zip DeDRM_alpha_${{ github.sha }}.zip

      - name: Auto-release
        id: autorelease
        uses: softprops/action-gh-release@v1
        with: 
          tag_name: autorelease
          token: ${{ github.token }}
          name: Automatic alpha release with latest changes
          body: |
            This release is automatically generated by Github for each commit. 

            This means, every time a change is made to this repo, this release will be updated to contain an untested copy of the plugin at that stage. This will contain the most up-to-date code, but it's not tested at all and may be broken.

            Last update based on Git commit ${{ github.sha }}.
          prerelease: true
          draft: true
          files: DeDRM_alpha_${{ github.sha }}.zip

      - name: Make release public
        uses: irongut/[email protected]
        with:
          token: ${{ github.token }}
          id: ${{ steps.autorelease.outputs.id }}
          draft: false
          prerelease: true