Logs save mode #345
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: cicd | |
on: | |
pull_request: | |
branches: | |
# - main | |
- dev | |
types: | |
- opened | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 | |
with: | |
egress-policy: audit | |
- name: Checkout Code | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2 | |
with: | |
node-version: 20 | |
- name: Install pnpm | |
run: npm install -g [email protected] | |
- name: Installing dependencies | |
run: pnpm i --frozen-lockfile | |
- name: Run tests | |
run: pnpm run test | |
- name: Run extract Addon | |
run: pnpm run update | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@48d8f15b2aaa3d255ca5af3eba4870f807ce6b3c # v45.0.2 | |
- name: List all changed files | |
run: | | |
echo "## ${{ steps.versioning.outputs.version }}" >> CHANGELOG.md | |
echo "" >> CHANGELOG.md | |
echo "### Files added: ${{steps.changed-files.outputs.added_files_count}}" >> CHANGELOG.md | |
echo "" >> CHANGELOG.md | |
for file in ${{ steps.changed-files.outputs.added_files }}; do | |
echo "$file was added" >> CHANGELOG.md | |
echo "" >> CHANGELOG.md | |
done | |
echo "### Files changed: ${{steps.changed-files.outputs.all_changed_and_modified_files_count}}" >> CHANGELOG.md | |
echo "" >> CHANGELOG.md | |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | |
echo "$file was changed" >> CHANGELOG.md | |
echo "" >> CHANGELOG.md | |
done | |
echo "" >> CHANGELOG.md | |
- name: commit changes | |
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4 | |
with: | |
add: CHANGELOG.md VERSION package.json capacity.json | |
author_name: estebanmathia | |
author_email: [email protected] | |
message: 'add info extract from addon' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} |