output variables #7
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: Build and Package | ||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
permissions: | ||
contents: read | ||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
CHROME: ${{ steps.def_file_name.outputs.CHROME }} | ||
FIREFOX: ${{ steps.def_file_name.outputs.FIREFOX }} | ||
SAFARI: ${{ steps.def_file_name.outputs.SAFARI }} | ||
VERSION: ${{ steps.get_version.outputs.VERSION }} | ||
steps: | ||
- name: Define file name | ||
id: def_file_name | ||
run: | | ||
echo "AWSF=awsf" >> $GITHUB_ENV | ||
echo "CHROME=${{ env.AWSF }}-chrome" >> $GITHUB_OUTPUT | ||
echo "FIREFOX=${{ env.AWSF }}-firefox" >> $GITHUB_OUTPUT | ||
echo "SAFARI=${{ env.AWSF }}-safari" >> $GITHUB_OUTPUT | ||
- name: Setup repo | ||
uses: actions/checkout@v4 | ||
- name: Extract current version | ||
id: get_version | ||
run: echo "VERSION=$(grep -oP '"version":\s*"\K[0-9.]+' manifest/template-manifest.json)" >> $GITHUB_OUTPUT | ||
- name: Create versioned directory | ||
run: | | ||
Check failure on line 37 in .github/workflows/make-package.yml GitHub Actions / Build and PackageInvalid workflow file
|
||
mkdir -p dist/v$version | ||
mkdir -p dist/v$VERSION | ||
mkdir -p dist/v${{ version }} | ||
mkdir -p dist/v${{ VERSION }} | ||
test: | ||
runs-on: ubuntu-latest | ||
needs: setup | ||
steps: | ||
- name: echo variables | ||
run: | | ||
echo $version | ||
echo $VERSION | ||
echo ${{version}} | ||
echo ${{VERSION}} | ||
echo $chrome | ||
echo $CHROME | ||
echo ${{chrome}} | ||
echo ${{CHROME}} | ||
chrome: | ||
runs-on: ubuntu-latest | ||
needs: setup | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Deno | ||
uses: denoland/setup-deno@v2 | ||
with: | ||
deno-version: v2.x | ||
- name: Make Chrome Manifest | ||
run: deno run dev-chrome | ||
- name: Zip Chrome extension | ||
run: zip -r dist/$chrome-v$version.zip * -x "*.git*" -x "node_modules/*" | ||
- name: Upload Chrome artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: $chrome-v$version | ||
path: dist/$chrome-v$version.zip | ||
firefox: | ||
runs-on: ubuntu-latest | ||
needs: chrome | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Deno | ||
uses: denoland/setup-deno@v2 | ||
with: | ||
deno-version: v2.x | ||
- name: Make Firefox Manifest | ||
run: deno run dev-firefox | ||
- name: Zip Firefox extension | ||
run: zip -r dist/$firefox-v$version.zip * -x "*.git*" -x "node_modules/*" | ||
- name: Upload Firefox artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: $firefox-v$version | ||
path: dist/$firefox-v$version.zip | ||
safari: | ||
runs-on: ubuntu-latest | ||
needs: firefox | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Deno | ||
uses: denoland/setup-deno@v2 | ||
with: | ||
deno-version: v2.x | ||
- name: Make Safari Manifest | ||
run: deno run dev-safari | ||
- name: Zip Safari extension | ||
run: zip -r dist/$safari-v$version.zip * -x "*.git*" -x "node_modules/*" | ||
- name: Upload Safari artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: $safari-v$version | ||
path: dist/$safari-v$version.zip |