From f1c6bdc79a5c90de923b5c60f51fb2e5e0453ecb Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Fri, 23 Aug 2019 04:23:42 +0200 Subject: [PATCH 1/7] Have README use v1-release --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4f9090ba..92a0bc44 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Simple example: - name: Build run: cargo build --release - name: Upload binaries to release - uses: svenstaro/upload-release-action@master + uses: svenstaro/upload-release-action@v1-release with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: target/release/mything @@ -80,7 +80,7 @@ Complex example with more operating systems: - name: Build run: cargo build --release - name: Upload binaries to release - uses: svenstaro/upload-release-action@master + uses: svenstaro/upload-release-action@v1-release with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: target/release/${{ matrix.artifact_name }} From 344275d0b153dd26e848a00b4bc8ec0be11857fc Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Fri, 23 Aug 2019 04:30:53 +0200 Subject: [PATCH 2/7] Nicer README --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 92a0bc44..e0c29150 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,11 @@ It runs on all operating systems types offered by GitHub. You must provide: - - `repo_token`: Usually you'll want to set this to `${{ secrets.GITHUB_TOKEN }}` - - `file`: A local file to be uploaded as the asset. - - `asset_name`: The name the file gets as an asset on a release. - - `tag`: The tag to uploaded into. If you want the current event's tag, use `${{ github.event.ref }}` - - `overwrite`: If an asset with name already exists, overwrite it. +- `repo_token`: Usually you'll want to set this to `${{ secrets.GITHUB_TOKEN }}` +- `file`: A local file to be uploaded as the asset. +- `asset_name`: The name the file gets as an asset on a release. +- `tag`: The tag to uploaded into. If you want the current event's tag, use `${{ github.event.ref }}` +- `overwrite`: If an asset with name already exists, overwrite it. ## Usage From dbd8f0788d768055506f372aad1c7555b6012286 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Fri, 23 Aug 2019 04:32:00 +0200 Subject: [PATCH 3/7] Even nicer README --- README.md | 128 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 66 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index e0c29150..731fe2f8 100644 --- a/README.md +++ b/README.md @@ -20,68 +20,72 @@ This is a common use case as you will want to upload release binaries for your t Simple example: - name: Publish - - on: - create: - tags: - - jobs: - build: - name: Publish binaries - runs-on: ubuntu-latest - - steps: - - uses: hecrj/setup-rust-action@master - with: - rust-version: stable - - uses: actions/checkout@v1 - - name: Build - run: cargo build --release - - name: Upload binaries to release - uses: svenstaro/upload-release-action@v1-release - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: target/release/mything - asset_name: mything - tag: {{ github.event.ref }} - overwrite: true +```yaml +name: Publish + +on: + create: + tags: + +jobs: + build: + name: Publish binaries + runs-on: ubuntu-latest + + steps: + - uses: hecrj/setup-rust-action@master + with: + rust-version: stable + - uses: actions/checkout@v1 + - name: Build + run: cargo build --release + - name: Upload binaries to release + uses: svenstaro/upload-release-action@v1-release + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: target/release/mything + asset_name: mything + tag: {{ github.event.ref }} + overwrite: true +``` Complex example with more operating systems: - name: Publish - - on: - create: - tags: - - jobs: - build: - name: Publish for ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - - os: ubuntu-latest - artifact_name: mything - asset_name: mything-linux-amd64 - - os: windows-latest - artifact_name: mything.exe - asset_name: mything-windows-amd64 - - os: macos-latest - artifact_name: mything - asset_name: mything-macos-amd64 - - steps: - - uses: hecrj/setup-rust-action@master - with: - rust-version: stable - - uses: actions/checkout@v1 - - name: Build - run: cargo build --release - - name: Upload binaries to release - uses: svenstaro/upload-release-action@v1-release - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: target/release/${{ matrix.artifact_name }} - asset_name: ${{ matrix.asset_name }} +```yaml +name: Publish + +on: + create: + tags: + +jobs: + build: + name: Publish for ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: ubuntu-latest + artifact_name: mything + asset_name: mything-linux-amd64 + - os: windows-latest + artifact_name: mything.exe + asset_name: mything-windows-amd64 + - os: macos-latest + artifact_name: mything + asset_name: mything-macos-amd64 + + steps: + - uses: hecrj/setup-rust-action@master + with: + rust-version: stable + - uses: actions/checkout@v1 + - name: Build + run: cargo build --release + - name: Upload binaries to release + uses: svenstaro/upload-release-action@v1-release + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: target/release/${{ matrix.artifact_name }} + asset_name: ${{ matrix.asset_name }} +``` From 4a503c7628cc24903d9818ec42fedcca8c27d470 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Fri, 23 Aug 2019 04:35:06 +0200 Subject: [PATCH 4/7] Add icon and color --- action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/action.yml b/action.yml index 69402ec6..0342d6a7 100644 --- a/action.yml +++ b/action.yml @@ -1,6 +1,8 @@ name: 'Upload files to a GitHub release' description: 'Upload files to a GitHub release (cross-platform)' author: 'Sven-Hendrik Haase' +icon: archive +color: orange inputs: repo_token: description: 'GitHub token' From 33976875ba16fc686a7385a6f1046b5ff0e4ad93 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Fri, 23 Aug 2019 04:37:48 +0200 Subject: [PATCH 5/7] Add lots of metadata to action.yml --- action.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 0342d6a7..2cbd286a 100644 --- a/action.yml +++ b/action.yml @@ -1,17 +1,22 @@ name: 'Upload files to a GitHub release' description: 'Upload files to a GitHub release (cross-platform)' author: 'Sven-Hendrik Haase' -icon: archive -color: orange +branding: + icon: archive + color: orange inputs: repo_token: description: 'GitHub token' + required: true file: description: 'Local file to upload' + required: true asset_name: description: 'Name of the asset' + required: true tag: description: 'Tag to use as a release' + required: true overwrite: description: 'Overwrite the release in case it already exists' runs: From 8fdb52ddd87803839dc487a2dc3315fdf6aef88b Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Fri, 23 Aug 2019 04:40:11 +0200 Subject: [PATCH 6/7] This is 1.0.0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index c721776e..a5489484 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "upload-release-action", - "version": "0.0.1", + "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index de72a36e..8b8820e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "upload-release-action", - "version": "0.0.1", + "version": "1.0.0", "private": true, "description": "Upload files to a GitHub release", "main": "lib/main.js", From 95a587681f0a796a888ea56a6d7e06c418aef976 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Fri, 23 Aug 2019 04:41:34 +0200 Subject: [PATCH 7/7] Have README use v1-release --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 731fe2f8..5244ca49 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: hecrj/setup-rust-action@master + - uses: hecrj/setup-rust-action@v1-release with: rust-version: stable - uses: actions/checkout@v1 @@ -76,7 +76,7 @@ jobs: asset_name: mything-macos-amd64 steps: - - uses: hecrj/setup-rust-action@master + - uses: hecrj/setup-rust-action@v1-release with: rust-version: stable - uses: actions/checkout@v1