Answer the question
In order to leave comments, you need to log in
GitHub Actions. Why is env. var.?
I decided to push an action that increases the patch version in package jason, but I ran into an incomprehensible problem (for the first time I work with yaml and actions). For some reason, the env var I created is no longer used, despite the fact that it definitely is.
name: Bump version
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Patch
id: version
run: echo "version=$(npm version patch --no-git-tag-version)" >> $GITHUB_ENV
- name: Add & Commit & Push
uses: EndBug/add-and[email protected]
with:
add: 'package.json package-lock.json'
message: 'Version $version'
tag: $version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
add: package.json package-lock.json
message: Version $version
tag: $version
cwd: .
env:
version: v1.0.1
GITHUB_TOKEN: ***
> Using "Version $version" as commit message.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question