|
4 | 4 | workflow_dispatch:
|
5 | 5 |
|
6 | 6 | jobs:
|
7 |
| - pre-release: |
8 |
| - name: Pre Release |
9 |
| - runs-on: ubuntu-latest |
10 |
| - steps: |
11 |
| - - name: Get current date |
12 |
| - id: date |
13 |
| - run: echo "::set-output name=date::$(date +'%Y-%m-%d')" |
14 |
| - - name: Checkout the repository |
15 |
| - uses: actions/checkout@v2 |
16 |
| - - name: Generate build files |
17 |
| - uses: thatisuday/go-cross-build@v1 |
18 |
| - with: |
19 |
| - platforms: 'linux/amd64, linux/arm, linux/arm64, windows/amd64, darwin/amd64' |
20 |
| - package: '' |
21 |
| - name: commitlog |
22 |
| - compress: 'true' |
23 |
| - dest: dist |
24 |
| - - uses: marvinpinto/action-automatic-releases@latest |
25 |
| - with: |
26 |
| - repo_token: '${{ secrets.GITHUB_TOKEN }}' |
27 |
| - automatic_release_tag: nightly-${{ steps.date.outputs.date }} |
28 |
| - prerelease: true |
29 |
| - title: "Nightly Build ${{ steps.date.outputs.date }}" |
30 |
| - files: dist/* |
| 7 | + pre-release: |
| 8 | + name: Pre Release |
| 9 | + runs-on: ubuntu-latest |
| 10 | + steps: |
| 11 | + - name: Get current date |
| 12 | + id: date |
| 13 | + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" |
| 14 | + - name: Checkout the repository |
| 15 | + uses: actions/checkout@v2 |
| 16 | + - name: Generate Change Log |
| 17 | + id: generate_log |
| 18 | + run: echo "::set-output name=changelog::$(go run main.go .)" |
| 19 | + - name: Generate build files |
| 20 | + uses: thatisuday/go-cross-build@v1 |
| 21 | + with: |
| 22 | + platforms: "linux/amd64, linux/arm, linux/arm64, windows/amd64, darwin/amd64" |
| 23 | + package: "" |
| 24 | + name: commitlog |
| 25 | + compress: "true" |
| 26 | + dest: dist |
| 27 | + - name: Create Release |
| 28 | + id: create_release |
| 29 | + uses: actions/create-release@v1 |
| 30 | + env: |
| 31 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 32 | + with: |
| 33 | + tag_name: ${{ github.ref }} |
| 34 | + release_name: Release ${{ github.ref }} |
| 35 | + body: ${{ steps.generate_log.outputs.changelog }} |
| 36 | + draft: false |
| 37 | + prerelease: false |
| 38 | + - name: Upload Release Asset |
| 39 | + id: upload-release-asset |
| 40 | + uses: actions/upload-release-asset@v1 |
| 41 | + env: |
| 42 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 43 | + with: |
| 44 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 45 | + asset_path: ./dist |
| 46 | + asset_name: "*" |
0 commit comments