Remove unnecessary console log message #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Development Release Asset | |
on: | |
push: | |
branches: | |
- '*' # triggers the workflow on pushes to any branch | |
jobs: | |
update-release-asset: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Get branch name | |
id: branch-name | |
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}" | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' | |
- name: Run repopack | |
run: npx repopack --include "**/*.md,**/*.js" | |
- name: Rename output file | |
run: mv repopack-output.txt ${{ steps.branch-name.outputs.branch }}-repopack.txt | |
- name: Get development release | |
id: get_release | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
const release = await github.rest.repos.getReleaseByTag({ | |
owner: 'fogg-lab', | |
repo: 'gene-platform', | |
tag: 'dev' | |
}); | |
return release.data.id; | |
- name: Update release asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: https://uploads.github.com/repos/fogg-lab/gene-platform/releases/${{ steps.get_release.outputs.result }}/assets{?name,label} | |
asset_path: ./${{ steps.branch-name.outputs.branch }}-repopack.txt | |
asset_name: ${{ steps.branch-name.outputs.branch }}-repopack.txt | |
asset_content_type: text/plain |