From 8b30a1656838a3d7b4fe7483629ad273ce9c6cad Mon Sep 17 00:00:00 2001 From: Sean Turner Date: Sun, 29 Sep 2024 20:40:35 -0400 Subject: [PATCH] Update workflows (#25) * Update workflows Update archive.yml. * Update workflows Update ghpages.yml. * Update workflows Update publish.yml. * Update workflows Update update.yml. * Update workflows Create LICENSE.md. --- .github/workflows/LICENSE.md | 1 + .github/workflows/archive.yml | 13 ++++++++++-- .github/workflows/ghpages.yml | 28 ++++++++++++-------------- .github/workflows/publish.yml | 38 ++++++++++++++++++++--------------- .github/workflows/update.yml | 2 +- 5 files changed, 48 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/LICENSE.md diff --git a/.github/workflows/LICENSE.md b/.github/workflows/LICENSE.md new file mode 100644 index 0000000..f002b82 --- /dev/null +++ b/.github/workflows/LICENSE.md @@ -0,0 +1 @@ +This project is in the public domain. diff --git a/.github/workflows/archive.yml b/.github/workflows/archive.yml index bfad094..dd9429a 100644 --- a/.github/workflows/archive.yml +++ b/.github/workflows/archive.yml @@ -6,6 +6,11 @@ on: repository_dispatch: types: [archive] workflow_dispatch: + inputs: + archive_full: + description: 'Recreate the archive from scratch' + default: false + type: boolean jobs: build: @@ -13,10 +18,14 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v4 + + # Note: No caching for this build! - name: "Update Archive" uses: martinthomson/i-d-template@v1 + env: + ARCHIVE_FULL: ${{ inputs.archive_full }} with: make: archive token: ${{ github.token }} @@ -28,6 +37,6 @@ jobs: token: ${{ github.token }} - name: "Save Archive" - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: path: archive.json diff --git a/.github/workflows/ghpages.yml b/.github/workflows/ghpages.yml index 118cb52..a1bf36e 100644 --- a/.github/workflows/ghpages.yml +++ b/.github/workflows/ghpages.yml @@ -20,25 +20,23 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v4 - - name: "Cache Setup" - id: cache-setup - run: | - mkdir -p "$HOME"/.cache/xml2rfc - echo "::set-output name=path::$HOME/.cache/xml2rfc" - date -u "+::set-output name=date::%FT%T" + - name: "Setup" + id: setup + run: date -u "+date=%FT%T" >>"$GITHUB_OUTPUT" - - name: "Cache References" - uses: actions/cache@v2 + - name: "Caching" + uses: actions/cache@v4 with: path: | - ${{ steps.cache-setup.outputs.path }} + .refcache + .venv + .gems + node_modules .targets.mk - key: refcache-${{ steps.cache-setup.outputs.date }} - restore-keys: | - refcache-${{ steps.cache-setup.outputs.date }} - refcache- + key: i-d-${{ steps.setup.outputs.date }} + restore-keys: i-d- - name: "Build Drafts" uses: martinthomson/i-d-template@v1 @@ -53,7 +51,7 @@ jobs: token: ${{ github.token }} - name: "Archive Built Drafts" - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: path: | draft-*.html diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index dd94df9..94d885f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,6 +4,12 @@ on: push: tags: - "draft-*" + workflow_dispatch: + inputs: + email: + description: "Submitter email" + default: "" + type: string jobs: build: @@ -11,29 +17,27 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v4 # See https://github.com/actions/checkout/issues/290 - name: "Get Tag Annotations" run: git fetch -f origin ${{ github.ref }}:${{ github.ref }} - - name: "Cache Setup" - id: cache-setup - run: | - mkdir -p "$HOME"/.cache/xml2rfc - echo "::set-output name=path::$HOME/.cache/xml2rfc" - date -u "+::set-output name=date::%FT%T" + - name: "Setup" + id: setup + run: date -u "+date=%FT%T" >>"$GITHUB_OUTPUT" - - name: "Cache References" - uses: actions/cache@v2 + - name: "Caching" + uses: actions/cache@v4 with: path: | - ${{ steps.cache-setup.outputs.path }} + .refcache + .venv + .gems + node_modules .targets.mk - key: refcache-${{ steps.date.outputs.date }} - restore-keys: | - refcache-${{ steps.date.outputs.date }} - refcache- + key: i-d-${{ steps.setup.outputs.date }} + restore-keys: i-d- - name: "Build Drafts" uses: martinthomson/i-d-template@v1 @@ -44,8 +48,10 @@ jobs: uses: martinthomson/i-d-template@v1 with: make: upload + env: + UPLOAD_EMAIL: ${{ inputs.email }} - name: "Archive Submitted Drafts" - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - path: "draft-*-[0-9][0-9].xml" + path: "versioned/draft-*-[0-9][0-9].*" diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 7a67007..0f8d6b8 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: "Update Generated Files" uses: martinthomson/i-d-template@v1