Skip to content

fix: publish in same job #4

fix: publish in same job

fix: publish in same job #4

Workflow file for this run

# Workflow to run on the main branch
name: main QA and release
on:
push:
branches:
- main
jobs:
test:
uses: ./.github/workflows/test.yml

Check failure on line 12 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / main QA and release

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 12, Col: 11): Input version is required, but not provided while calling.
release:
needs: [test]
runs-on: ubuntu-latest
outputs:
new_tag_version: ${{ steps.tag_version.outputs.new_tag_version }}
steps:
- name: Checkout πŸ›Ž
uses: actions/checkout@master
- name: Setup node env πŸ—
uses: actions/setup-node@v4
with:
node-version: 18
check-latest: true
- name: Install dependencies πŸ‘¨πŸ»β€
run: yarn install
- name: Dry run to get the next release version
id: tag_version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export NEXT_TAG_VERSION=$(npx semantic-release --dry-run | grep 'The next release version is' | sed -E 's/.* ([[:digit:].]+)$/\1/')
echo "new_tag_version=${NEXT_TAG_VERSION}" >> $GITHUB_OUTPUT
- name: Release πŸš€
run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Version
run: echo "The version is ${{ steps.tag_version.outputs.new_tag_version }}"
- name: Build and publish
uses: ./.github/workflows/docker-build.yml
with:
push: true
version: ${{ steps.tag_version.outputs.new_tag_version }}