Skip to content

Prerelease

Prerelease #39

Workflow file for this run

name: Prerelease
on:
workflow_run:
workflows: ['Test']
branches: ['main', 'next']
types:
- completed
jobs:
main:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: '${{ secrets.TOLGEE_MACHINE_PAT }}'
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '20.x'
- name: Set git globals
run: |
git config --local user.email "machine@tolgee.io"
git config --local user.name "Tolgee Machine"
- name: Npm ci
run: npm ci
- name: Run get new version
run: npm run release-dry
- name: Set version property
id: version
run: echo ::set-output name=VERSION::$(test -e .VERSION && echo v$(cat .VERSION))
- name: Upgrade version in manifest.json
run: sh upgrade_manifest.sh $(cat .VERSION)
- name: Build (build & test)
run: export NODE_ENV=production && npm run build
- name: Set git globals
run: |
git config --local user.email "machine@tolgee.io"
git config --local user.name "Tolgee Machine"
- name: Run npm release
if: ${{ steps.version.outputs.VERSION != '' }}
run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.TOLGEE_MACHINE_PAT }}
- name: Create Release
if: ${{ steps.version.outputs.VERSION != '' }}
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.TOLGEE_MACHINE_PAT }}
with:
tag_name: ${{ steps.version.outputs.VERSION }}
release_name: Release ${{ steps.version.outputs.VERSION }}
draft: false
prerelease: true
- name: Upload Release Asset Chrome
if: ${{ steps.version.outputs.VERSION != '' }}
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TOLGEE_MACHINE_PAT }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist-zip/chrome.zip
asset_name: Tolgee-chrome-${{ steps.version.outputs.VERSION }}.zip
asset_content_type: application/zip
- name: Upload Release Asset Firefox
if: ${{ steps.version.outputs.VERSION != '' }}
id: upload-release-asset

Check failure on line 82 in .github/workflows/prerelease.yml

View workflow run for this annotation

GitHub Actions / Prerelease

Invalid workflow file

The workflow is not valid. .github/workflows/prerelease.yml (Line: 82, Col: 13): The identifier 'upload-release-asset' may not be used more than once within the same scope.
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TOLGEE_MACHINE_PAT }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist-zip/firefox.zip
asset_name: Tolgee-firefox-${{ steps.version.outputs.VERSION }}.zip
asset_content_type: application/zip