Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support specify the publish file name #39

Merged
merged 1 commit into from
Mar 5, 2022
Merged

Support specify the publish file name #39

merged 1 commit into from
Mar 5, 2022

Conversation

ihaiker
Copy link
Contributor

@ihaiker ihaiker commented Jan 16, 2022

No description provided.

@ihaiker ihaiker changed the title #38 Support specify the publish file name Support specify the publish file name Jan 16, 2022
@Douile Douile linked an issue Jan 19, 2022 that may be closed by this pull request
@Douile
Copy link
Member

Douile commented Jan 19, 2022

This change would mean when user specifies the NAME variable they also need to change it for each target otherwise only 1 artifact will be uploaded which makes me hesitant to add it. We do also need to add documentation for the NAME variable.

@Douile Douile linked an issue Jan 19, 2022 that may be closed by this pull request
@MH4GF
Copy link

MH4GF commented Jan 19, 2022

This change would mean when user specifies the NAME variable they also need to change it for each target otherwise only 1 artifact will be uploaded which makes me hesitant to add it.

I think I can use matrix like this in this PR implementation, right?

on:
  release:
    types: [created]

jobs:
  release:
    name: release ${{ matrix.target }}
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        include:
          - target: x86_64-pc-windows-gnu
            name: windows-amd64
          - target: x86_64-unknown-linux-musl
            name: linux-amd64
          - target: x86_64-apple-darwin
            name: darwin-amd64
    steps:
      - uses: actions/checkout@v2
      - name: Compile and release
        uses: rust-build/rust-build.action@latest
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          RUSTTARGET: ${{ matrix.target }}
          EXTRA_FILES: "README.md LICENSE"
          NAME: ${{ matrix.name }}

@ihaiker
Copy link
Contributor Author

ihaiker commented Jan 19, 2022

This change would mean when user specifies the NAME variable they also need to change it for each target otherwise only 1 artifact will be uploaded which makes me hesitant to add it.

I think I can use matrix like this in this PR implementation, right?

on:
  release:
    types: [created]

jobs:
  release:
    name: release ${{ matrix.target }}
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        include:
          - target: x86_64-pc-windows-gnu
            name: windows-amd64
          - target: x86_64-unknown-linux-musl
            name: linux-amd64
          - target: x86_64-apple-darwin
            name: darwin-amd64
    steps:
      - uses: actions/checkout@v2
      - name: Compile and release
        uses: rust-build/rust-build.action@latest
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          RUSTTARGET: ${{ matrix.target }}
          EXTRA_FILES: "README.md LICENSE"
          NAME: ${{ matrix.name }}

Yes, I want to use it like this

@Douile
Copy link
Member

Douile commented Jan 19, 2022

This change would mean when user specifies the NAME variable they also need to change it for each target otherwise only 1 artifact will be uploaded which makes me hesitant to add it.

I think I can use matrix like this in this PR implementation, right?

on:
  release:
    types: [created]

jobs:
  release:
    name: release ${{ matrix.target }}
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        include:
          - target: x86_64-pc-windows-gnu
            name: windows-amd64
          - target: x86_64-unknown-linux-musl
            name: linux-amd64
          - target: x86_64-apple-darwin
            name: darwin-amd64
    steps:
      - uses: actions/checkout@v2
      - name: Compile and release
        uses: rust-build/rust-build.action@latest
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          RUSTTARGET: ${{ matrix.target }}
          EXTRA_FILES: "README.md LICENSE"
          NAME: ${{ matrix.name }}

Yes that is fine. Also while we're at it might be worth renaming NAME to something more descriptive like ARCHIVE_NAME

@MH4GF
Copy link

MH4GF commented Jan 21, 2022

@ihaiker can you add documentation for the ARCHIVE_NAME and complete this pull request? This feature would be awesome to me! if you're busy, I'll make another pull request.

@Douile Douile merged commit 674a3d3 into rust-build:master Mar 5, 2022
Douile added a commit that referenced this pull request Mar 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support specify the publish file name Allow customizing the names of the generated files
3 participants