clean-captain-v1.2.1 #2
Workflow file for this run
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
name: Release | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get release info | |
run: | | |
{ | |
echo "RELEASE_TAG=${GITHUB_REF/refs\/tags\//}" | |
echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}" | |
} >> "$GITHUB_ENV" | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
src | |
- name: Install zip | |
run: sudo apt-get install zip | |
- name: Create zip file without including the parent folder | |
run: cd src && zip -r ../extension.zip * | |
- name: Upload release asset for Chrome | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./extension.zip | |
asset_name: "chrome-${{ env.REPOSITORY_NAME }}_${{ env.RELEASE_TAG }}.zip" | |
asset_content_type: application/zip | |
- name: Upload release asset for Brave | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./extension.zip | |
asset_name: "brave-${{ env.REPOSITORY_NAME }}_${{ env.RELEASE_TAG }}.zip" | |
asset_content_type: application/zip |