mirror of
https://github.com/julia-actions/cache.git
synced 2026-02-14 10:06:53 +08:00
Compare commits
12 Commits
cv/release
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
227b3767fc | ||
|
|
9a3120aab8 | ||
|
|
43522e389d | ||
|
|
e8472695fb | ||
|
|
2061bcf01c | ||
|
|
c4f371876b | ||
|
|
38850d7b75 | ||
|
|
429bb24537 | ||
|
|
8af8844cd0 | ||
|
|
424a20aa56 | ||
|
|
5dc38e58e3 | ||
|
|
05a577a682 |
12
.github/workflows/CI.yml
vendored
12
.github/workflows/CI.yml
vendored
@@ -59,7 +59,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
JULIA_DEPOT_PATH: /tmp/julia-depot
|
JULIA_DEPOT_PATH: /tmp/julia-depot
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
- name: Set cache-name
|
- name: Set cache-name
|
||||||
id: cache-name
|
id: cache-name
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -117,7 +117,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
JULIA_DEPOT_PATH: /tmp/julia-depot
|
JULIA_DEPOT_PATH: /tmp/julia-depot
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
- uses: julia-actions/setup-julia@v2
|
- uses: julia-actions/setup-julia@v2
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
@@ -161,7 +161,7 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
cache-name: ${{ steps.cache-name.outputs.cache-name }}
|
cache-name: ${{ steps.cache-name.outputs.cache-name }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
- name: Set cache-name
|
- name: Set cache-name
|
||||||
id: cache-name
|
id: cache-name
|
||||||
run: |
|
run: |
|
||||||
@@ -193,7 +193,7 @@ jobs:
|
|||||||
needs: test-save-nomatrix
|
needs: test-save-nomatrix
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
id: cache
|
id: cache
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -233,7 +233,7 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
cache-name: ${{ steps.cache-name.outputs.cache-name }}
|
cache-name: ${{ steps.cache-name.outputs.cache-name }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
- name: Set cache-name
|
- name: Set cache-name
|
||||||
id: cache-name
|
id: cache-name
|
||||||
run: |
|
run: |
|
||||||
@@ -259,7 +259,7 @@ jobs:
|
|||||||
needs: test-save-cloned-registry
|
needs: test-save-cloned-registry
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
- name: Add General registry clone
|
- name: Add General registry clone
|
||||||
shell: julia --color=yes {0}
|
shell: julia --color=yes {0}
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- uses: julia-actions/setup-julia@v2
|
- uses: julia-actions/setup-julia@v2
|
||||||
- uses: julia-actions/cache@v2
|
- uses: julia-actions/cache@v2
|
||||||
- uses: julia-actions/julia-buildpkg@v1
|
- uses: julia-actions/julia-buildpkg@v1
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ runs:
|
|||||||
env:
|
env:
|
||||||
MATRIX_JSON: ${{ toJSON(matrix) }}
|
MATRIX_JSON: ${{ toJSON(matrix) }}
|
||||||
|
|
||||||
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
|
||||||
id: cache
|
id: cache
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
@@ -178,7 +178,7 @@ runs:
|
|||||||
# - https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
|
# - https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
|
||||||
|
|
||||||
# Not windows
|
# Not windows
|
||||||
- uses: pyTooling/Actions/with-post-step@d6342484cd335d4c9c63d4f52f267c54d5bc3b19 # v5.4.0
|
- uses: pyTooling/Actions/with-post-step@370c306306304663febee1525552a09e061588fa # v7.4.2
|
||||||
if: ${{ inputs.delete-old-caches != 'false' &&
|
if: ${{ inputs.delete-old-caches != 'false' &&
|
||||||
github.ref != format('refs/heads/{0}', github.event.repository.default_branch) &&
|
github.ref != format('refs/heads/{0}', github.event.repository.default_branch) &&
|
||||||
runner.OS != 'Windows' }}
|
runner.OS != 'Windows' }}
|
||||||
@@ -191,7 +191,7 @@ runs:
|
|||||||
GH_TOKEN: ${{ inputs.token }}
|
GH_TOKEN: ${{ inputs.token }}
|
||||||
|
|
||||||
# Windows (because this action uses command prompt on windows)
|
# Windows (because this action uses command prompt on windows)
|
||||||
- uses: pyTooling/Actions/with-post-step@d6342484cd335d4c9c63d4f52f267c54d5bc3b19 # v5.4.0
|
- uses: pyTooling/Actions/with-post-step@370c306306304663febee1525552a09e061588fa # v7.4.2
|
||||||
if: ${{ inputs.delete-old-caches != 'false' &&
|
if: ${{ inputs.delete-old-caches != 'false' &&
|
||||||
github.ref != format('refs/heads/{0}', github.event.repository.default_branch) &&
|
github.ref != format('refs/heads/{0}', github.event.repository.default_branch) &&
|
||||||
runner.OS == 'Windows' }}
|
runner.OS == 'Windows' }}
|
||||||
|
|||||||
@@ -4,52 +4,53 @@ In this guide, as an example, `v2.2.0` refers to the version number of the new r
|
|||||||
|
|
||||||
## Part 1: Use the Git CLI to create and push the Git tags
|
## Part 1: Use the Git CLI to create and push the Git tags
|
||||||
|
|
||||||
Step 1: Clone the repository:
|
Step 1: Create a new lightweight tag of the form `vMAJOR.MINOR.PATCH`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone git@github.com:julia-actions/cache.git
|
git clone git@github.com:julia-actions/cache.git
|
||||||
cd cache
|
cd cache
|
||||||
```
|
git fetch --all --tags
|
||||||
|
|
||||||
Step 2: Create a new lightweight tag of the form `vMAJOR.MINOR.PATCH`.
|
git checkout main
|
||||||
|
|
||||||
```bash
|
git --no-pager log -1
|
||||||
# Get the commit SHA of the latest pushed commit on the default branch
|
# Take note of the commit hash here.
|
||||||
git fetch origin --tags --force
|
|
||||||
commit_sha="$(git rev-parse origin/HEAD)"
|
|
||||||
|
|
||||||
# Validate this commit is the one you intend to release
|
|
||||||
git --no-pager log -1 "${commit_sha:?}"
|
|
||||||
|
|
||||||
# Now, create a new lightweight tag of the form `vMAJOR.MINOR.PATCH`.
|
# Now, create a new lightweight tag of the form `vMAJOR.MINOR.PATCH`.
|
||||||
|
#
|
||||||
|
# Replace `commit_hash` with the commit hash that you obtained from the
|
||||||
|
# `git log -1` step.
|
||||||
|
#
|
||||||
# Replace `v2.2.0` with the actual version number that you want to use.
|
# Replace `v2.2.0` with the actual version number that you want to use.
|
||||||
tag=v2.2.0
|
git tag v2.2.0 commit_hash
|
||||||
git tag "${tag:?}" "${commit_sha:?}"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Step 3: Once you've created the new release, you need to update the major tag to point to the new release. For example, suppose that the previous release was `v2.1.0`, and suppose that you just created the new release `v2.2.0`. You need to update the major tag `v2` so that it points to `v2.2.0`. Here are the commands:
|
Step 2: Once you've created the new release, you need to update the `v2` tag to point to the new release. For example, suppose that the previous release was `v2.1.0`, and suppose that you just created the new release `v2.2.0`. You need to update the `v2` tag so that it points to `v2.2.0`. Here are the commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Create/update the new major tag locally, where the new major tag will point to the
|
# Create/update the new v2 tag locally, where the new v2 tag will point to the
|
||||||
# release that you created in the previous step.
|
# release that you created in the previous step.
|
||||||
#
|
#
|
||||||
# The `-f` flag forcibly overwrites the old major tag (if it exists).
|
# Make sure to change `v2.2.0` to the actual value for the tag that you just
|
||||||
major_tag="$(echo ${tag:?} | grep -o '^v[0-9]*')"
|
# created in the previous step.
|
||||||
git tag --force "${major_tag:?}" "${tag:?}"
|
#
|
||||||
|
# The `-f` flag forcibly overwrites the old
|
||||||
|
# `v2` tag (if it exists).
|
||||||
|
git tag -f v2 v2.2.0
|
||||||
```
|
```
|
||||||
|
|
||||||
Step 4: Now you need to push the tags:
|
Step 3: Now you need to push the tags:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Regular-push the new tag:
|
# Regular-push the new `v2.2.0` tag:
|
||||||
git push origin tag "${tag:?}"
|
git push origin tag v2.2.0
|
||||||
|
|
||||||
# Force-push the new major tag:
|
# Force-push the new v2 tag:
|
||||||
git push origin tag "${major_tag:?}" --force
|
git push origin tag v2 --force
|
||||||
```
|
```
|
||||||
|
|
||||||
## Part 2: Create the GitHub Release
|
## Part 2: Create the GitHub Release
|
||||||
|
|
||||||
Go to the [Releases](https://github.com/julia-actions/cache/releases) section of this repo and create a new release (using the GitHub web interface).
|
Go to the [Releases](https://github.com/julia-actions/cache/releases) section of this repo and create a new release (using the GitHub web interface).
|
||||||
|
|
||||||
For the "choose a tag" drop-down field, select the new tag (e.g. `v2.2.0`) that you created and pushed in Part 1 of this guide.
|
For the "choose a tag" drop-down field, select the `v2.2.0` tag that you created and pushed in Part 1 of this guide.
|
||||||
|
|||||||
Reference in New Issue
Block a user