mirror of
				https://github.com/flynx/photobook.git
				synced 2025-11-02 20:30:09 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			89 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			89 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
name: make dist
 | 
						|
 | 
						|
on:
 | 
						|
  push:
 | 
						|
    branches: [ "main" ]
 | 
						|
    tags: v**
 | 
						|
  pull_request:
 | 
						|
    branches: [ "main" ]
 | 
						|
 | 
						|
jobs:
 | 
						|
  make-dist:
 | 
						|
    runs-on: ubuntu-latest
 | 
						|
 | 
						|
    steps:
 | 
						|
    - uses: actions/checkout@v3
 | 
						|
 | 
						|
    - name: Build dist
 | 
						|
      uses: xu-cheng/texlive-action/full@v1
 | 
						|
      with:
 | 
						|
        run: |
 | 
						|
          apk add make git zip grep
 | 
						|
          git config --global --add safe.directory '*'
 | 
						|
          echo "VERSION=$(make version)" >> $GITHUB_ENV
 | 
						|
          # XXX not sure about this...
 | 
						|
          #COMMENT="$(git log -1 --pretty=%B | grep -v "Signed-off-by:")"
 | 
						|
          #COMMENT="${COMMENT//'%'/'%25'}"
 | 
						|
          #COMMENT="${COMMENT//$'\n'/'%0A'}"
 | 
						|
          #COMMENT="${COMMENT//$'\n'/'%0D'}"
 | 
						|
          #echo 'COMMENT<<EOF' >> $GITHUB_ENV
 | 
						|
          #echo "${COMMENT}" >> $GITHUB_ENV
 | 
						|
          #echo 'EOF' >> $GITHUB_ENV
 | 
						|
          # XXX if comment is multi-line it breaks the CTAN announcement...
 | 
						|
          echo 'COMMENT<<EOF' >> $GITHUB_ENV
 | 
						|
          git log -1 --pretty=%B | grep -v "Signed-off-by:" >> $GITHUB_ENV
 | 
						|
          echo 'EOF' >> $GITHUB_ENV
 | 
						|
          make dist ctan-dist
 | 
						|
 | 
						|
    - name: Release
 | 
						|
      uses: softprops/action-gh-release@v1
 | 
						|
      if: startsWith(github.ref, 'refs/tags/')
 | 
						|
      with:
 | 
						|
        files: |
 | 
						|
          dist/photobook-*.zip 
 | 
						|
          photobook.pdf
 | 
						|
        
 | 
						|
    - name: Artifacts - build
 | 
						|
      uses: actions/upload-artifact@v3
 | 
						|
      with:
 | 
						|
        name: build artifacts
 | 
						|
        path: photobook.pdf
 | 
						|
 | 
						|
    - name: Artifacts - dist
 | 
						|
      uses: actions/upload-artifact@v3
 | 
						|
      with:
 | 
						|
        name: dist artifacts
 | 
						|
        path: dist/photobook-*.zip
 | 
						|
        
 | 
						|
    - name: Upload to CTAN (release)
 | 
						|
      uses: paolobrasolin/ctan-submit-action@v1
 | 
						|
      if: startsWith(github.ref, 'refs/tags/')
 | 
						|
      with: 
 | 
						|
        action: upload
 | 
						|
        file_path: dist/photobook.zip
 | 
						|
        fields: |
 | 
						|
            pkg: photobook
 | 
						|
            version: ${{ env.VERSION }}
 | 
						|
            update: "true"
 | 
						|
            author: Alex A. Naanou
 | 
						|
            email: alex.nanou@gmail.com
 | 
						|
            uploader: Alex A. Naanou <alex.nanou@gmail.com>
 | 
						|
            license: bsd3
 | 
						|
            home: https://github.com/flynx/photobook
 | 
						|
            repository: https://github.com/flynx/photobook
 | 
						|
            summary: >
 | 
						|
              Document class for typesetting photo books.
 | 
						|
            description: >
 | 
						|
              The photobook LaTeX document class extends the book class
 | 
						|
              defining a set of parameters, meta-macros, macros and
 | 
						|
              environments with reasonable defaults to help typeset,
 | 
						|
              build and print books mainly based on visual/image content.
 | 
						|
            # XXX multi-line comments will break things...
 | 
						|
            #     ...another potential cause is an empty line in a commit, 
 | 
						|
            #     need more testing...
 | 
						|
            announcement: >
 | 
						|
              ${{ env.COMMENT }}
 | 
						|
               
 | 
						|
        
 | 
						|
        
 |