Skip to content

Commit

Permalink
switched set-output and save-state to new GITHUB_OUTPUT and GITHUB_ST… (
Browse files Browse the repository at this point in the history
#3)

* switched set-output and save-state to new GITHUB_OUTPUT and GITHUB_STATE usage and updated core actions to v3

* switched set-output and save-state to new GITHUB_OUTPUT and GITHUB_STATE usage and updated core actions to v3 part 2
  • Loading branch information
pirog authored Apr 27, 2023
1 parent d856906 commit bf3d174
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pr-func-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout action code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Run Pkg Action
uses: ./
id: basic-func-test
Expand All @@ -25,7 +25,7 @@ jobs:
- windows-2022
steps:
- name: Checkout action code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Run Pkg Action
uses: ./
id: basic-func-test
Expand All @@ -48,7 +48,7 @@ jobs:
- win
steps:
- name: Checkout action code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Run Pkg Action
uses: ./
id: basic-func-test
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr-test-inputs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout action code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Run Pkg Action
uses: ./
id: default-input-tests
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
- arm64
steps:
- name: Checkout action code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Run Pkg Action
uses: ./
id: arch-input-tests
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:

steps:
- name: Checkout action code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Run Pkg Action
uses: ./
id: runner-os-tests
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:

steps:
- name: Checkout action code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Run Pkg Action
uses: ./
id: os-input-tests
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v2.2.1 - [April 27, 2023](https://github.com/lando/pkg-action/releases/tag/v2.2.1)

* Switched `set-output` and `save-state` to new `$GITHUB_OUTPUT` and `$GITHUB_STATE`. See [this](https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/)
* Updated core actions to `v3`

## v2.2.0 - [March 1, 2023](https://github.com/lando/pkg-action/releases/tag/v2.2.0)

* Added input `pkg` to specify version of [@vercel/pkg](https://github.com/vercel/pkg)
Expand Down
22 changes: 11 additions & 11 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,24 +69,24 @@ runs:
run: |
echo "::group::Setting internal outputs"
if [ "${{ inputs.os }}" == "Linux" ]; then
echo "::set-output name=target-os::linux"
echo "target-os=linux" >> $GITHUB_OUTPUT
elif [ "${{ inputs.os }}" == "macOS" ]; then
echo "::set-output name=target-os::macos"
echo "target-os=macos" >> $GITHUB_OUTPUT
elif [ "${{ inputs.os }}" == "Windows" ]; then
echo "::set-output name=target-os::win"
echo "target-os=win" >> $GITHUB_OUTPUT
else
echo "::set-output name=target-os::${{ inputs.os }}"
echo "target-os=${{ inputs.os }}" >> $GITHUB_OUTPUT
fi
if [ "${{ inputs.arch }}" == "amd64" ]; then
echo "::set-output name=target-arch::x64"
echo "target-arch=x64" >> $GITHUB_OUTPUT
elif [ "${{ inputs.arch }}" == "aarch64" ]; then
echo "::set-output name=target-arch::arm64"
echo "target-arch=arm64" >> $GITHUB_OUTPUT
else
echo "::set-output name=target-arch::${{ inputs.arch }}"
echo "target-arch=${{ inputs.arch }}" >> $GITHUB_OUTPUT
fi
echo "::set-output name=target-node::${{ inputs.node-version }}"
echo "target-node=${{ inputs.node-version }}" >> $GITHUB_OUTPUT
echo "::endgroup::"
- name: Install node 16
Expand All @@ -111,12 +111,12 @@ runs:
run: |
echo "::group::Setting outputs"
if [ "${{ steps.pkg-action-internal.outputs.target-os }}" == "win" ]; then
echo "::set-output name=file::dist/$(node -p "require('./package.json').name").exe"
echo "file=dist/$(node -p "require('./package.json').name").exe" >> $GITHUB_OUTPUT
else
echo "::set-output name=file::dist/$(node -p "require('./package.json').name")"
echo "file=dist/$(node -p "require('./package.json').name")" >> $GITHUB_OUTPUT
fi
echo "::set-output name=artifact-key::${{ github.event.repository.name }}-${{ steps.pkg-action-internal.outputs.target-node }}-${{ steps.pkg-action-internal.outputs.target-os }}-${{ steps.pkg-action-internal.outputs.target-arch }}-${{ github.sha }}"
echo "artifact-key=${{ github.event.repository.name }}-${{ steps.pkg-action-internal.outputs.target-node }}-${{ steps.pkg-action-internal.outputs.target-os }}-${{ steps.pkg-action-internal.outputs.target-arch }}-${{ github.sha }}" >> $GITHUB_OUTPUT
echo "::endgroup::"
- name: Run x64 pkg command
Expand Down

0 comments on commit bf3d174

Please sign in to comment.