This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
test #8
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: 'release-please' | |
on: | |
push: | |
branches: | |
- master | |
- 'hotfix/**' | |
jobs: | |
update-nix-flake: | |
runs-on: ubuntu-latest | |
outputs: | |
NPM_DEPS_HASH: ${{ steps.prefetch.outputs.NPM_DEPS_HASH }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }} | |
- name: Install Nix | |
uses: cachix/install-nix-action@v26 | |
with: | |
github_access_token: ${{ secrets.PERSO_TOKEN }} | |
nix_path: nixpkgs=channel:nixos-unstable | |
- name: Install prefetch-npm-deps | |
run: nix-env -i prefetch-npm-deps -f '<nixpkgs>' | |
- name: prefetch | |
id: prefetch | |
run: echo "NPM_DEPS_HASH=$(prefetch-npm-deps package-lock.json)" >> $GITHUB_OUTPUT | |
- name: escape | |
id: escape | |
run: echo "NPM_DEPS_HASH_ESCAPED=$(echo ${{ steps.prefetch.outputs.NPM_DEPS_HASH }} | sed 's/\//\\\\\//gip')" >> $GITHUB_OUTPUT | |
- name: update | |
run: sed -i "s/sha[^\"]\+/${{ steps.escape.outputs.NPM_DEPS_HASH_ESCAPED }}/" flake.nix | |
- name: check for update | |
run: if [-n $(git status --porcelain)] then | |
- run: git add . | |
- run: nix flake update | |
- run: | | |
git config --global user.name 'Florian Sanders' | |
git config --global user.email 'florian.sanders@clever-cloud.com' | |
git commit -m "chore(flake): update nix flake" | |
git push | |
release-please: | |
runs-on: ubuntu-latest | |
needs: update-nix-flake | |
steps: | |
- uses: google-github-actions/release-please-action@v3 | |
with: | |
token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }} | |
release-type: node | |
include-v-in-tag: false | |
default-branch: ${{ github.ref_name }} | |
changelog-types: '[{"type": "feat", "section": "π Features"}, {"type": "fix", "section": "π Bug Fixes"}, {"type": "perf", "section": "πͺ Performance Improvements"}, {"type": "deps", "section": "ποΈ Dependencies", "hidden": true}, {"type": "revert", "section": "β© Reverts"}, {"type": "docs", "section": "π Documentation", "hidden": true}, {"type": "style", "section": "π¨ Styles", "hidden": true}, {"type": "chore", "section": "π§Ή Miscellaneous Chores", "hidden": true}, {"type": "refactor", "section": "π Code Refactoring", "hidden": true}, {"type": "test", "section": "π¬ Tests", "hidden": true}, {"type": "build", "section": "ποΈ Build System", "hidden": true}, {"type": "ci", "section": "π€ Continuous Integration", "hidden": true}]' |