Skip to content

fix path

fix path #10

Workflow file for this run

name: Create Release
on:
push:
branches:
- main
permissions:
contents: read
jobs:
build:
permissions:
contents: write # for creating release
name: Build packages
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get release version
id: release_version
run: |
echo "${{ steps.release_version.outputs.VERSION }}" > VERSION
- name: Assemble release notes
run: |
> release.body.txt
echo "Version: ${{ steps.release_version.outputs.VERSION }}" >> release.body.txt
echo "Changes:" >> release.body.txt
git log --pretty=format:"- %s" -- . ":(exclude).github" >> release.body.txt
- name: Update manifest.json for Firefox
run: |
version=$(< VERSION)
jq --arg version "$version" '.version = $version' platform/firefox/manifest.json > manifest_temp.json && mv manifest_temp.json platform/firefox/manifest.json
- name: Update manifest.json for Chromium
run: |
version=$(< VERSION)
jq --arg version "$version" '.version = $version' platform/chromium/manifest.json > manifest_temp.json && mv manifest_temp.json platform/chromium/manifest.json
- name: Create GitHub release
id: create_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag_name: ${{ steps.release_version.outputs.VERSION }}
release_name: ${{ steps.release_version.outputs.VERSION }}
draft: true
prerelease: true
body_path: release.body.txt
- name: Build packages
run: |
tools/make-chromium.sh ${{ steps.release_version.outputs.VERSION }}
tools/make-firefox.sh ${{ steps.release_version.outputs.VERSION }}
- 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: dist/build/amazonRedirectPlus_${{ steps.release_version.outputs.VERSION }}.chromium.zip
asset_name: amazonRedirectPlus_${{ steps.release_version.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: dist/build/amazonRedirectPlus_${{ steps.release_version.outputs.VERSION }}.firefox.xpi
asset_name: amazonRedirectPlus_${{ steps.release_version.outputs.VERSION }}.firefox.xpi
asset_content_type: application/octet-stream