File tree Expand file tree Collapse file tree 1 file changed +34
-1
lines changed Expand file tree Collapse file tree 1 file changed +34
-1
lines changed Original file line number Diff line number Diff line change 4444 */build/
4545 retention-days : 14
4646
47+ - name : Create Release
48+ if : github.ref == 'refs/heads/main'
49+ id : create_release
50+ uses : actions/create-release@v1
51+ env :
52+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
53+ with :
54+ tag_name : v${{ github.run_number }}
55+ release_name : Release v${{ github.run_number }}
56+ draft : false
57+ prerelease : false
58+ body : |
59+ Automated release from GitHub Actions build #${{ github.run_number }}
60+
61+ Contains build artifacts from all example projects.
62+
63+ - name : Zip Artifacts
64+ if : github.ref == 'refs/heads/main'
65+ run : |
66+ cd ${{ github.workspace }}
67+ zip -r build-artifacts.zip */dist/ */build/
68+
69+ - name : Upload Release Assets
70+ if : github.ref == 'refs/heads/main'
71+ uses : actions/upload-release-asset@v1
72+ env :
73+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
74+ with :
75+ upload_url : ${{ steps.create_release.outputs.upload_url }}
76+ asset_path : ./build-artifacts.zip
77+ asset_name : build-artifacts.zip
78+ asset_content_type : application/zip
79+
4780permissions :
48- contents : read
81+ contents : write
4982 pages : write
5083 id-token : write
You can’t perform that action at this time.
0 commit comments