mirror of
				https://code.forgejo.org/actions/forgejo-release.git
				synced 2025-11-04 06:41:57 +02:00 
			
		
		
		
	Merge pull request 'Improve documentation with example for downloading a release' (#5) from Crown0815/forgejo-release:main into main
Reviewed-on: https://code.forgejo.org/actions/forgejo-release/pulls/5 Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
This commit is contained in:
		
						commit
						888150209e
					
				
					 1 changed files with 25 additions and 3 deletions
				
			
		
							
								
								
									
										28
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										28
									
								
								README.md
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -27,7 +27,9 @@ Upload or download the assets of a release to a Forgejo instance.
 | 
			
		|||
 | 
			
		||||
## Example
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
### Upload
 | 
			
		||||
 | 
			
		||||
```yaml
 | 
			
		||||
on: [tag]
 | 
			
		||||
jobs:
 | 
			
		||||
  upload-release:
 | 
			
		||||
| 
						 | 
				
			
			@ -36,12 +38,32 @@ jobs:
 | 
			
		|||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: actions/forgejo-release@v1
 | 
			
		||||
        with:
 | 
			
		||||
	  direction: upload
 | 
			
		||||
	  url: https://code.forgejo.org
 | 
			
		||||
	        direction: upload
 | 
			
		||||
	        url: https://code.forgejo.org
 | 
			
		||||
          release-dir: dist/release
 | 
			
		||||
          release-notes: "MY RELEASE NOTES"
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Download
 | 
			
		||||
 | 
			
		||||
Example downloading the forgejo release v1.21.4-0 into the working directory:
 | 
			
		||||
 | 
			
		||||
```yaml
 | 
			
		||||
on: [tag]
 | 
			
		||||
jobs:
 | 
			
		||||
  download-release:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - uses: actions/forgejo-release@v1
 | 
			
		||||
        with:
 | 
			
		||||
	        direction: download
 | 
			
		||||
	        url: https://code.forgejo.org
 | 
			
		||||
          repo: forgejo/forgejo
 | 
			
		||||
          tag: v1.21.4-0
 | 
			
		||||
          release-dir: ./  # by default, files are downloaded into dist/release
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Update the README
 | 
			
		||||
 | 
			
		||||
With https://github.com/npalm/action-docs `action-docs --update-readme`
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue