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

dist directory was removed from gh-action branch #397

Closed
say8425 opened this issue Dec 22, 2020 · 4 comments
Closed

dist directory was removed from gh-action branch #397

say8425 opened this issue Dec 22, 2020 · 4 comments
Assignees

Comments

@say8425
Copy link

say8425 commented Dec 22, 2020

Describe the bug: バグの概要

File not found: '/home/runner/work/_actions/say8425/aws-secrets-manager-actions/v1.3.2/dist/index.js'

To Reproduce: 再現手順

Expected behavior: 期待する動作

  • I expect dist directory was remained from my gh-action branch as release-github-actions did that.
@welcome
Copy link

welcome bot commented Dec 22, 2020

🙌 Thanks for opening your first issue here! Be sure to follow the issue template!

@technote-space
Copy link
Owner

This is because the JS-DevTools/npm-publish action is polluting env.

JS-DevTools/npm-publish#15

If you do something similar to this fix, I think the problem will go away.
alexanderbird/where-away@0cb2d33

@technote-space
Copy link
Owner

technote-space commented Dec 23, 2020

or I think you can use job to separate the environment as follows:

jobs:
  package:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Setup nodejs
        uses: actions/setup-node@v1
        with:
          node-version: '12.x'
      - name: Get Yarn Cache Directory
        id: yarn-cache
        run: echo "::set-output name=dir::$(yarn cache dir)"
      - name: Cache node dependencies
        uses: actions/cache@v2
        with:
          path: ${{ steps.yarn-cache.outputs.dir }}
          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
          restore-keys: |
            ${{ runner.os }}-yarn-
      - name: Install Packages
        run: yarn install
      - name: Check package version
        uses: technote-space/package-version-check-action@v1
        with:
          COMMIT_DISABLED: 1
      - name: Release to NPM Registry
        uses: JS-DevTools/npm-publish@v1
        with:
          token: ${{ secrets.NPM_TOKEN }}

  release:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Get Yarn Cache Directory
        id: yarn-cache
        run: echo "::set-output name=dir::$(yarn cache dir)"
      - name: Cache node dependencies
        uses: actions/cache@v2
        with:
          path: ${{ steps.yarn-cache.outputs.dir }}
          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
          restore-keys: |
            ${{ runner.os }}-yarn-
      - name: Release to GitHub Actions Market
        uses: technote-space/release-github-actions@v6
        with:
          PACKAGE_MANAGER: yarn
          BUILD_COMMAND: yarn package

@say8425
Copy link
Author

say8425 commented Jan 4, 2021

As you mentioned, separating a job completely fix this issue!
Super amazing thanks 😁
https://github.com/say8425/aws-secrets-manager-actions/blob/master/.github/workflows/release.yml#L90

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

2 participants