Git Product home page Git Product logo

Comments (7)

itsmeow avatar itsmeow commented on June 16, 2024

The name is id! so steps.upload.outputs.id, in the workflow you have to set the id of the step to upload to access it with that notation

from curseforge-upload.

itsmeow avatar itsmeow commented on June 16, 2024
jobs:
  example:
    steps:
    - uses: actions/checkout@v1
    - name: Upload
      id: upload
      uses: itsmeow/curseforge-upload@master
      with:
        # ...
    - name: Discord
      content: https://curseforge.com/.../${{steps.upload.outputs.id}}

from curseforge-upload.

Macleykun avatar Macleykun commented on June 16, 2024

Heya! thank you for the solution!
I also wanted to ask (sorry i though i made another issue for this) if it's possible to refer to a file to fill in the changelog!

I'm trying to take out the part of a changelog file into a variable to then use in the changelog input, but it's not working out for me.
Is it possible to add this feature to you action? I really love the action you made and i've almost fully automated the CI/CD for a friend :D

from curseforge-upload.

itsmeow avatar itsmeow commented on June 16, 2024

Look on the action marketplace for an action that reads text files, then you can use output from that! Workflows are modular, so mix them up!

from curseforge-upload.

Macleykun avatar Macleykun commented on June 16, 2024

True, but i've already gotten a way to extract the part of a changelog.md:
https://github.com/Macleykun/Future-MC/blob/Improved-CI/.github/workflows/autobuilds.yml
More specific:
awk -v version='0.2.7.4' '/## Version / {printit = $3 == version}; printit;' 'changelog.md' | awk '!/^$/'
Which gives the perfect output (0.2.7.4 is normally a var). But i can't get this output into a (env) variable for:

https://github.com/Macleykun/Future-MC/blob/Improved-CI/.github/workflows/autobuilds.yml#L73

I've tried different ways, like using echo and inserting the var into the $GITHUB_ENV like i do with the others, but it always returned an empty var back. When using the command on a Linux machine locally it works

If your action can accept a file as an input to read from for the changelog input, then people only have to extract what's needed/delete what isn't needed from their changelog.md!

Unless i've completely missed an action that can read from a file, cut the part we want and input it straight into a multi lined var :P.

My friend uses this: https://github.com/Macleykun/Future-MC/blob/Improved-CI/changelog.md to make his changelog, an i want to use the latest version part into the changelog on CF :D

from curseforge-upload.

Macleykun avatar Macleykun commented on June 16, 2024

So i've fixed most of my issue but, i don't think it's possible to have a multi-lined markdown env variable for the input of the changelog: https://github.com/Macleykun/Future-MC/runs/4275394553?check_suite_focus=true

perhaps if we could use a command in the input changelog or giving a file (that's already been trimmed) would solve/help!

from curseforge-upload.

Macleykun avatar Macleykun commented on June 16, 2024

Managed to fix it by doing this:
https://github.com/Macleykun/Future-MC/blob/Improved-CI/.github/workflows/autobuilds.yml#L57

      echo 'CHANGELOG<<EOF' >> $GITHUB_ENV
      awk -v version='${{ env.VERSION }}' '/## Version / {printit = $3 == version}; printit;' 'changelog.md' | awk '!/^$/' >> $GITHUB_ENV
      echo 'EOF' >> $GITHUB_ENV

from curseforge-upload.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.