Skip to content

Commit 6ae2eb1

Browse files
authored
FIX: artifact paths (#22)
* FIX: fix artifact download Downloaded artifacts are _always_ put into a directory, even if the artifact itself is a file. * CHORE: update version * REF: move tagging to end of job
1 parent 706b171 commit 6ae2eb1

File tree

3 files changed

+36
-37
lines changed

3 files changed

+36
-37
lines changed

.github/workflows/ci.yml

+34-36
Original file line numberDiff line numberDiff line change
@@ -389,38 +389,6 @@ jobs:
389389
run: |
390390
echo "::set-output name=new::$(./scripts/newCargoVersion.sh)"
391391
392-
- name: "Add Git Tag Ref for Version"
393-
if: "${{ steps.cargo-version.outputs.new == 'true' }}"
394-
uses: "actions/github-script@v2"
395-
with:
396-
github-token: "${{ secrets.GITHUB_TOKEN }}"
397-
script: |
398-
github.git.createRef({
399-
owner: "${{ github.repository_owner }}",
400-
repo: "json-logic-rs",
401-
ref: "refs/tags/v${{ steps.get-version.outputs.version }}",
402-
sha: "${{ github.sha }}",
403-
})
404-
405-
- name: "Add GitHub Annotated Tag for Version"
406-
if: "${{ steps.cargo-version.outputs.new == 'true' }}"
407-
uses: "actions/github-script@v2"
408-
with:
409-
github-token: "${{ secrets.GITHUB_TOKEN }}"
410-
script: |
411-
github.git.createTag({
412-
owner: "${{ github.repository_owner }}",
413-
repo: "json-logic-rs",
414-
tag: "v${{ steps.get-version.outputs.version }}",
415-
message: "Vesrion ${{ steps.get-version.outputs.version }}",
416-
object: "${{ github.sha }}",
417-
type: "commit",
418-
tagger: {
419-
name: "${{ github.actor }}",
420-
421-
}
422-
})
423-
424392
- name: "Check if new NPM version"
425393
id: npm-version
426394
shell: bash
@@ -488,6 +456,38 @@ jobs:
488456
TWINE_USERNAME: "__token__"
489457
TWINE_PASSWORD: "${{ secrets.PYPI_TOKEN }}"
490458

459+
- name: "Add Git Tag Ref for Version"
460+
if: "${{ steps.cargo-version.outputs.new == 'true' }}"
461+
uses: "actions/github-script@v2"
462+
with:
463+
github-token: "${{ secrets.GITHUB_TOKEN }}"
464+
script: |
465+
github.git.createRef({
466+
owner: "${{ github.repository_owner }}",
467+
repo: "json-logic-rs",
468+
ref: "refs/tags/v${{ steps.get-version.outputs.version }}",
469+
sha: "${{ github.sha }}",
470+
})
471+
472+
- name: "Add GitHub Annotated Tag for Version"
473+
if: "${{ steps.cargo-version.outputs.new == 'true' }}"
474+
uses: "actions/github-script@v2"
475+
with:
476+
github-token: "${{ secrets.GITHUB_TOKEN }}"
477+
script: |
478+
github.git.createTag({
479+
owner: "${{ github.repository_owner }}",
480+
repo: "json-logic-rs",
481+
tag: "v${{ steps.get-version.outputs.version }}",
482+
message: "Vesrion ${{ steps.get-version.outputs.version }}",
483+
object: "${{ github.sha }}",
484+
type: "commit",
485+
tagger: {
486+
name: "${{ github.actor }}",
487+
488+
}
489+
})
490+
491491
distribute-py-wheels-mac-windows:
492492
name: "Distribute Mac and Windows Python Wheels"
493493
needs: ["distribute", "build-python-wheels-mac-windows"]
@@ -511,13 +511,12 @@ jobs:
511511
uses: "actions/download-artifact@v1"
512512
with:
513513
name: "new-cargo"
514-
path: "tmp-new-cargo-ver"
515514

516515
- name: "Check for new cargo version"
517516
id: cargo-version
518517
shell: bash
519518
run: |
520-
echo "::set-output name=new::$(cat tmp-new-cargo-ver)"
519+
echo "::set-output name=new::$(cat ./new-cargo/tmp-new-cargo-ver)"
521520
522521
- name: "Pull Python Wheels"
523522
if: "${{ steps.cargo-version.outputs.new == 'true' }}"
@@ -564,13 +563,12 @@ jobs:
564563
uses: "actions/download-artifact@v1"
565564
with:
566565
name: "new-cargo"
567-
path: "tmp-new-cargo-ver"
568566

569567
- name: "Check for new cargo version"
570568
id: cargo-version
571569
shell: bash
572570
run: |
573-
echo "::set-output name=new::$(cat tmp-new-cargo-ver)"
571+
echo "::set-output name=new::$(cat ./new-cargo/tmp-new-cargo-ver)"
574572
575573
- name: "Pull Python Wheel"
576574
if: "${{ steps.cargo-version.outputs.new == 'true' }}"

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ venv/
3030

3131
# Used in the CI pipeline
3232
tmp-new-cargo-ver
33+
new-cargo/

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ license = "MIT"
99
name = "jsonlogic-rs"
1010
readme = "README.md"
1111
repository = "https://github.com/bestowinc/json-logic-rs"
12-
version = "0.1.2"
12+
version = "0.1.3"
1313

1414
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1515

0 commit comments

Comments
 (0)