Switch to GitHub Packages npm registry #3
Workflow file for this run
This file contains hidden or 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 | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| registry-url: 'https://npm.pkg.github.com' | |
| scope: '@koke1997' | |
| - name: Install dependencies | |
| run: | | |
| pip install "rendercv[full]" | |
| sudo apt-get update && sudo apt-get install -y pandoc | |
| - name: Render CV | |
| run: rendercv render Ivan_Kokalovic_CV.yaml | |
| - name: Generate DOCX | |
| run: | | |
| pandoc "rendercv_output/Ivan_Kokalović_CV.md" -o "Ivan_Kokalovic_CV.docx" | |
| - name: Rename PDF for easier download | |
| run: | | |
| cp "rendercv_output/Ivan_Kokalović_CV.pdf" "Ivan_Kokalovic_CV.pdf" | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| Ivan_Kokalovic_CV.pdf | |
| Ivan_Kokalovic_CV.docx | |
| generate_release_notes: true | |
| body: | | |
| ## CV Release ${{ github.ref_name }} | |
| ### Downloads | |
| - **PDF**: `Ivan_Kokalovic_CV.pdf` - Best for viewing and printing | |
| - **DOCX**: `Ivan_Kokalovic_CV.docx` - Best for ATS systems and editing | |
| ### GitHub Package | |
| ```bash | |
| npx @koke1997/cv-website-template | |
| ``` | |
| ### Changes | |
| See the auto-generated release notes below for details. | |
| - name: Update package version | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| npm version $VERSION --no-git-tag-version --allow-same-version | |
| - name: Publish to GitHub Packages | |
| run: npm publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |