Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to give the previous step output as argument to the script? #183

Open
LakshmiRavali opened this issue Sep 7, 2021 · 0 comments

Comments

@LakshmiRavali
Copy link

Can we pass the previous step output as an argument to the script?

get-data:
    runs-on: ubuntu-latest
    outputs:
      change-log: ${{ steps.update-specs.outputs.change-log }}
    steps:
      - name: Checkout repo
        uses: actions/checkout@v2
      - name: Test
        run: |
          echo "::set-output name=change-log::testChange"
  release:
    runs-on: ubuntu-latest
    needs: [get-data]
    steps:
      - name: Checkout repo
        uses: actions/checkout@v2
      - run: |
          git pull
          npm install
      - name: semanticRelease
        run: |
          npm i --save-dev @semantic-release/exec
          npx semantic-release -t \${version}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json:

"plugins": [
        "@semantic-release/commit-analyzer",
        "@semantic-release/release-notes-generator",
      [
        "@semantic-release/changelog",
        {
          "changelogFile": "CHANGES.md"
        }
      ],
      [
        "@semantic-release/npm",
        {
          "npmPublish": false
        }
      ],
      "@semantic-release/github",
      [
        "@semantic-release/git",
        {
          "assets": [
            "CHANGES.md",
            "package.json"
          ],
          "message": "chore(release): set `package.json` to ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
        }
      ],
      [
        "@semantic-release/exec",
        {
          "successCmd": "node .github/scripts/build.js ${nextRelease.version}"  // Here Can we pass the change-log variable of get-data step?
        }
      ]
    ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant