forked from dhowe/AdNauseam
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: AdNauseam release | ||
|
||
on: | ||
create: | ||
branches: master | ||
|
||
permissions: | ||
contents: read | ||
|
||
# I used the following project as template to get started: | ||
# https://github.com/dessant/search-by-image/blob/master/.github/workflows/ci.yml | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
contents: write # for creating release | ||
name: Build packages | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
- name: Get release information | ||
id: release_info | ||
run: | | ||
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | ||
- name: Create GitHub release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
tag_name: ${{ steps.release_info.outputs.VERSION }} | ||
release_name: ${{ steps.release_info.outputs.VERSION }} | ||
prerelease: true | ||
- name: Build MV2 packages | ||
run: | | ||
tools/make-artifacts.sh | ||
- name: Upload Chromium package | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: artifacts/adnauseam-${{ steps.release_info.outputs.VERSION }}.chromium.zip | ||
asset_name: adnauseam-${{ steps.release_info.outputs.VERSION }}.chromium.zip | ||
asset_content_type: application/octet-stream | ||
- name: Upload Firefox package | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: artifacts/adnauseam-${{ steps.release_info.outputs.VERSION }}.firefox.zip | ||
asset_name: adnauseam-${{ steps.release_info.outputs.VERSION }}.firefox.zip | ||
asset_content_type: application/octet-stream | ||
- name: Upload Edge package | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: artifacts/adnauseam-${{ steps.release_info.outputs.VERSION }}.edge.zip | ||
asset_name: adnauseam-${{ steps.release_info.outputs.VERSION }}.edge.zip | ||
asset_content_type: application/octet-stream | ||
- name: Upload Opera package | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: artifacts/adnauseam-${{ steps.release_info.outputs.VERSION }}.opera.crx | ||
asset_name: adnauseam-${{ steps.release_info.outputs.VERSION }}.opera.crx | ||
asset_content_type: application/octet-stream |